Re: Unicode-bidi Isolate

2 views
Skip to first unread message
Message has been deleted

Sheron Norsworthy

unread,
Jul 18, 2024, 4:28:34 AM7/18/24
to quitothinla

The unicode-bidi CSS property, together with the direction property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The unicode-bidi property overrides this algorithm and allows the developer to control the text embedding.

unicode-bidi isolate


DESCARGAR https://vbooc.com/2yPx5s



For inline elements this creates an override. For block container elements this creates an override for inline-level descendants not within another block container element. This means that inside the element, reordering is strictly in sequence according to the direction property; the implicit part of the bidirectional algorithm is ignored.

This keyword indicates that the element's container directionality should be calculated without considering the content of this element. The element is therefore isolated from its siblings. When applying its bidirectional-resolution algorithm, its container element treats it as one or several U+FFFC Object Replacement Character, i.e. like an image.

This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the direction property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm. This value allows the display of data that is already formatted using a tool following the Unicode Bidirectional Algorithm.

\n This keyword makes the elements directionality calculated without considering its parent bidirectional state or the value of the direction property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.\n This value allows the display of data that is already formatted using a tool following the Unicode Bidirectional Algorithm.\n

I am struggling to learn the usage of the unicode-bidi property. For example I thought if I set direction to a word formet with Latin Alphabet letters and assign the value embed to the unicode-bidi property the word will be isolated and will not affect the surrounding context. However the code below does the opposite of what I expected:

This is a draft document which may be updated, replaced, or superseded by other documents at any time. Publication does not imply endorsement by the Unicode Consortium. This is not a stable document; it is inappropriate to cite this document as other than a work in progress.

This document has been reviewed by Unicode members and other interested parties, and has been approved for publication by the Unicode Consortium. This is a stable document and may be used as reference material or cited as a normative reference by other specifications.

A Unicode Standard Annex (UAX) forms an integral part of theUnicode Standard, but is published online as a separate document. TheUnicode Standard may require conformance to normative content in a UnicodeStandard Annex, if so specified in the Conformance chapter of that versionof the Unicode Standard. The version number of a UAX document corresponds tothe version of the Unicode Standard of which it forms a part.

The Unicode Standard prescribes a memory representation orderknown as logical order. When text is presented in horizontal lines, mostscripts display characters from left to right. However, there are severalscripts (such as Arabic or Hebrew) where the natural ordering of horizontaltext in display is from right to left. If all of the text hasa uniform horizontal direction, then the ordering of the display text is unambiguous.

However, because these right-to-left scriptsuse digits that are written from left to right, the text is actually bidirectional:a mixture of right-to-left and left-to-right text. In addition todigits, embedded words from English and other scripts are also written fromleft to right, also producing bidirectional text. Without a clearspecification, ambiguities can arise in determining the ordering of the displayed characters when thehorizontal direction of the text is not uniform.

This annex describes the algorithm used to determine the directionality for bidirectional Unicode text. The algorithm extends the implicit model currently employed by a number of existing implementations and adds explicit formatting characters for special circumstances. In most cases, there is no need to include additional information with the text to obtain correct display ordering.

However, in the case of bidirectional text, there are circumstances wherean implicit bidirectional ordering is not sufficient to producecomprehensible text. To deal with these cases, a minimal set of directionalformatting characters is defined to control the ordering of characters whenrendered. This allows exact control of the display ordering for legibleinterchange and ensures that plain text used for simple items like filenames or labels can always be correctly ordered for display.

Each character has an implicit bidirectional type. The bidirectional types left-to-right and right-to-left are called strong types, and characters of those types are called strong directional characters. The bidirectional types associated with numbers are called weak types, and characters of those types are called weak directional characters. With the exception of the directional formatting characters, the remaining bidirectional types and characters are called neutral. The algorithm uses the implicit bidirectional types of the characters in a text to arrive at a reasonable display ordering for text.

Three types of explicit directional formatting characters are used to modify the standard implicit UnicodeBidirectional Algorithm (UBA). In addition, there are implicit directional formatting characters, the right-to-left and left-to-right marks. The effects of all of these formatting characters are limited to the current paragraph; thus, they are terminated by a paragraph separator.

Although the term embedding is used for some explicit formatting characters, the text within the scope of the embedding formatting characters is not independent of the surrounding text. Characters within an embedding can affect the ordering of characters outside, and vice versa. This is not the case with the isolate formatting characters, however. Characters within an isolate cannot affect the ordering of characters outside it, or vice versa. The effect that an isolate as a whole has on the ordering of the surrounding characters is the same as that of a neutral character, whereas an embedding or override roughly has the effect of a strong character.

The following characters signal that a piece of text is to be treated as embedded. For example, an English quotation in the middle of an Arabic sentence could be marked as being embedded left-to-right text. If there were a Hebrew phrase in the middle of the English quotation, that phrase could be marked as being embedded right-to-left text. Embeddings can be nested one inside another, and in isolates and overrides. Abbr. Code Point Name Description LRE U+202A LEFT-TO-RIGHT EMBEDDING Treat the following text as embedded left-to-right. RLE U+202B RIGHT-TO-LEFT EMBEDDING Treat the following text as embedded right-to-left. The effect of right-left line direction, for example, can be accomplished by embedding the text with RLE...PDF. (PDF will be described in Section 2.3, Terminating Explicit Directional Embeddings and Overrides.)

The following characters allow the bidirectional character types to be overridden when required for special cases, such as for part numbers. They are to be avoided wherever possible, because of security concerns. For more information, see [UTR36]. Directional overrides can be nested one inside another, and in embeddings and isolates.

The precise meaning of these characters will be made clear in the discussion of the algorithm. The right-to-left override, for example, can be used to force a part number made of mixed English, digits and Hebrew letters to be written from right to left.

The following characters signal that a piece of text is to be treated as directionally isolated from its surroundings. They are very similar to the explicit embedding formatting characters. However, while an embedding roughly has the effect of a strong character on the ordering of the surrounding text, an isolate has the effect of a neutral like U+FFFC OBJECT REPLACEMENT CHARACTER, and is assigned the corresponding display position in the surrounding text. Furthermore, the text inside the isolate has no effect on the ordering of the text outside it, and vice versa.

In addition to allowing the embedding of strongly directional text without unduly affecting the bidirectional order of its surroundings, one of the isolate formatting characters also offers an extra feature: embedding text while inferring its direction heuristically from its constituent characters.

d3342ee215
Reply all
Reply to author
Forward
0 new messages