Precomposed character
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (October 2024) |
A precomposed character (alternatively composite character or decomposable character) is a multi-glyph entity represented in Unicode by a single codepoint. A precomposed character may represent a letter with a diacritical mark, such as ⟨é⟩ (U+00E9 é LATIN SMALL LETTER E WITH ACUTE).
The same character can also be created using a sequence of codepoints, one for each of the glyphs that comprise the character. For example, in Unicode terms the letter ⟨é⟩ is a character that can be represented directly using U+00E9 or alternatively can be decomposed into an equivalent string of the base letter ⟨e⟩ (U+0065 e LATIN SMALL LETTER E) together with the combining form of the acute accent (U+0301 ◌́ COMBINING ACUTE ACCENT). Similarly, precomposed ligatures are precompositions of their constituent letters or graphemes – for example, the U+0133 ij LATIN SMALL LIGATURE IJ, used in Dutch.
Precomposed characters are the legacy solution for representing many special letters in various character sets. In Unicode, they were included for compatibility with early encoding systems, such as the various components of ISO 8859 and other kinds of "extended ASCII". More recent Unicode policy has been to resist creation of new precomposed characters if the character can be produced using combining forms.
Comparing precomposed and decomposed characters
[edit]In the following example, the Swedish surname Åström is written in the two alternative ways, the first one with a precomposed Å (U+00C5) and ö (U+00F6), and the second one in decomposed form using the base letter A (U+0041) with a combining ring above (U+030A) and an o (U+006F) with a combining diaeresis (U+0308).[1]


- Åström (U+00C5 U+0073 U+0074 U+0072 U+00F6 U+006D)
- Åström (U+0041 U+030A U+0073 U+0074 U+0072 U+006F U+0308 U+006D)
Except for the different colors, the two solutions are canonically equivalent and should therefore render identically.[2] In practice, however, various applications and typefaces have difficulties with both precomposed characters and their equivalent decomposed sequences. In the worst case, combining diacritics may be disregarded or rendered as unrecognized characters after their base letters, as they are not included in all computer fonts. The following examples, using less common characters, illustrate such problems. The first shows the Sanskrit word nṝṇāṃ "of humans" in IAST transliteration. It is the genitive plural of nṛ "man, human being", for which Pāṇini (6.4.6) allows the form with long ṝ alongside nṛṇām;[3] before a following consonant, it is written with anusvara ṃ, as in the Bhāgavatapurāṇa 11.20.6.[4]
- nṝṇāṃ (U+006E U+1E5D U+1E47 U+0101 U+1E43)
- nṝṇāṃ (U+006E U+0072 U+0323 U+0304 U+006E U+0323 U+0061 U+0304 U+006D U+0323)[1]
The second example is the Livonian word nōțõpǟ "head of cabbage", a compound of nōțõz "cabbage" and pǟ "head".[5][6] It contains, among other characters, ț (t with a comma below) and ǟ, which, like ṝ in the first example, consists of a base letter and two diacritics:
- nōțõpǟ (U+006E U+014D U+021B U+00F5 U+0070 U+01DF)
- nōțõpǟ (U+006E U+006F U+0304 U+0074 U+0326 U+006F U+0303 U+0070 U+0061 U+0308 U+0304)[1]
In some situations, the precomposed characters marked in green may render as unrecognized characters, or their typographical appearance may be very different from that of the letters with no diacritic: the initial n in the first example, and n and p in the second. On the second line of each example, the base letters should at least render correctly even if the combining diacritics could not be recognized.
The OpenType feature ccmp (Glyph Composition / Decomposition) allows the default glyph of a character to be replaced with multiple glyphs, or the default glyphs of multiple characters to be replaced with a single glyph. These substitutions are used in glyph processing and rendering.[7] This allows a font to define precomposed characters at their codepoints as compositions of the glyphs of the individual characters, without requiring a separately drawn glyph of their own.
Chinese characters
[edit]In theory, most Chinese characters as encoded by Han unification and similar schemes could be treated as precomposed characters, since they can be reduced (decomposed) to their constituent radical and phonetic components with Chinese character description languages. Such an approach could reduce the number of characters in the character set from tens of thousands to just a few thousand. On the other hand, a decomposed character set would introduce challenges for searching and editing software and require more bytes of encoding per document. One particular challenge would be the multiple-to-multiple projections between the set of decomposed characters and the precomposed character—one precomposed character may be decomposed into multiple different sets of decomposed characters while one set of decomposed characters could contract themselves into multiple different precomposed characters. There is no strict requirement or constraints regarding the relative position between components within a character, the form of variant and transform (narrow, widen, stretch, rotate, etc.) applied on components, nor the number of each components.
See also
[edit]- Alphabetic Presentation Forms – Unicode character block
- Arabic Presentation Forms-A – Unicode character block
- Arabic Presentation Forms-B – Unicode character block
- Complex text layout – Neighbour-dependent grapheme positioning
- Compose key – Computer key to initiate glyph merger
- Dead key – Special kind of modifier keyboard key
- List of precomposed Latin characters in Unicode
- Unicode compatibility characters – Characters encoded solely to maintain round-trip convertibility with other standards
- Unicode equivalence – Aspect of the Unicode standard
Sources
[edit]- The Unicode Standard, Version 5.2: Conformance (see Section 3.7 for Decomposition). The Unicode Consortium, December 2009.
- MSDN: Defining a Character Set. April 8, 2010.
- Unicode Normalization Forms (Unicode® Standard Annex #15): http://unicode.org/reports/tr15/
External links
[edit]- Free Idg Serif, a derivative of the FreeSerif font with added declarations of precomposed characters.
References
[edit]- 1 2 3 "UnicodeData.txt – Unicode Character Database 17.0.0" (Text file). The Unicode Consortium. Retrieved 20 September 2026.
- ↑ Ken Whistler (12 August 2026). "Unicode Normalization Forms (Unicode Standard Annex #15, Revision 58)". The Unicode Consortium. Retrieved 20 September 2026. Unicode 18.0.0; especially sections 1.1, 1.2 and 3.
- ↑ Monier Monier-Williams (1899). A Sanskrit-English Dictionary. Oxford: Clarendon Press. p. 567. Retrieved 26 October 2026. Entry nṛ (third column): genitive plural nṛṇām or nṝṇām, with a reference to Pāṇini 6.4.6. Digitized by the Cologne Digital Sanskrit Dictionaries.
- ↑ "Bhagavata-Purana 11". GRETIL – Göttingen Register of Electronic Texts in Indian Languages (in Sanskrit). Göttingen State and University Library. Retrieved 26 October 2026. Verse 11.20.6: yogās trayo mayā proktā nṝṇāṃ śreyo-vidhitsayā.
- ↑ Ernštreits, Valts; et al., eds. (2024). "nōțõpǟ". Livonian lexicographic database. Livonian.tech (in Latvian). University of Latvia, Livonian Institute. Retrieved 26 October 2026. Valts Ernštreits is the editor-in-chief. Noun, Latvian kāpostgalva "head of cabbage", marked as a standard word; see also nōțõz "cabbage" (Latvian kāposts).
- ↑ Tiit-Rein Viitso; Valts Ernštreits (2012). Līvõkīel-ēstikīel-lețkīel sõnārōntõz. Liivi-eesti-läti sõnaraamat. Lībiešu-igauņu-latviešu vārdnīca (in Livonian, Estonian, and Latvian). Tartu, Riga: Tartu Ülikool, Latviešu valodas aģentūra. ISBN 978-9984-815-76-3. Online edition, entries nǭțõ|pǟ, nǭțõz and pǟ, accessed 26 October 2026. Estonian kapsapea, Latvian kāpostgalva. The dictionary uses ǭ to indicate pronunciation where standard orthography uses ō, and separates the elements of compounds with a vertical bar.
- ↑ "Registered features, a–e: ccmp – Glyph Composition / Decomposition". OpenType specification. Microsoft. Retrieved 20 September 2026.