Ký tự kết hợp
Ký tự gắn vào ký tự cơ sở trước đó để thay đổi nó. Danh mục chung: Mn (không chiếm chỗ), Mc (kết hợp chiếm chỗ), Me (bao quanh). Ví dụ: ◌́ (U+0301 Combining Acute).
What is a Combining Character?
A combining character is a Unicode character that has no independent visual form of its own — instead, it attaches to and modifies the preceding character (called the base character). Combining characters implement diacritical marks, tone marks, vowel signs, and other modifier symbols that, in Unicode's model, are logically separate from the letter they modify.
The key insight is that Unicode separates the identity of a character from its rendering. A letter with a diacritic can be represented either as a single precomposed code point (é = U+00E9) or as a base letter followed by a combining mark (e + ◌́ = U+0065 U+0301). Both sequences represent the same abstract character and produce the same rendered output.
How Combining Characters Work
Combining characters have a General Category of Mn (Non-spacing Mark), Mc (Spacing Mark), or Me (Enclosing Mark). Non-spacing marks are the most common — they occupy zero advance width and position themselves relative to the base character's glyph using the font's anchor points.
When a text shaping engine encounters a base character followed by one or more combining marks, it: 1. Retrieves the base glyph from the font 2. Positions each combining glyph at the appropriate anchor (top, bottom, left, right) 3. Renders them as a single grapheme cluster
Multiple combining characters can stack on a single base:
a + ◌̂ + ◌̄ = â̄ (a with circumflex and macron)
Unicode defines a canonical ordering for combining marks based on their Combining Class value (0–255). Marks with lower combining class values (e.g., below-base nuktas) appear before marks with higher values (e.g., above-base accents) in normalized text.
Important Combining Character Ranges
| Range | Name | Contents |
|---|---|---|
| U+0300–U+036F | Combining Diacritical Marks | Accents, umlauts, tildes |
| U+0591–U+05C7 | Hebrew Cantillation/Vowels | Nikud, cantillation marks |
| U+064B–U+065F | Arabic Diacritics | Harakat (vowel marks) |
| U+1AB0–U+1AFF | Combining Diacritical Marks Extended | Extended phonetic use |
| U+1DC0–U+1DFF | Combining Diacritical Marks Supplement | Additional marks |
| U+20D0–U+20FF | Combining Diacritical Marks for Symbols | Used with math symbols |
Grapheme Clusters
A base character plus all its combining marks form a grapheme cluster — the unit that users perceive as a single character. Programming languages must account for this:
import unicodedata
# "e" + combining acute = é
s = "e\u0301"
print(len(s)) # 2 (two code points)
print(s) # é (looks like 1 character)
# Precomposed é
s2 = "\u00e9"
print(len(s2)) # 1 (one code point)
print(s == s2) # False! Different code points
# Normalize to compare
import unicodedata
print(unicodedata.normalize("NFC", s) == s2) # True
JavaScript's Intl.Segmenter and Swift's String.count handle grapheme clusters correctly; many other APIs count code points instead.
Quick Facts
| Property | Value |
|---|---|
| Unicode category | Mn (Non-spacing Mark), Mc (Spacing Mark), Me (Enclosing Mark) |
| Main combining block | U+0300–U+036F (112 characters) |
| Combining class range | 0 (base) to 255 (various positions) |
| Max stacking | No hard limit; practical fonts support 2–4 layers |
| Normalization | NFC = precomposed preferred; NFD = fully decomposed |
| Grapheme cluster API | Python: regex module; JS: Intl.Segmenter; Swift: String |
| Visual indicator in charts | Often shown as ◌ (dotted circle) placeholder |
Thuật ngữ liên quan
Thêm trong Typography
Hai ký tự trở lên được kết hợp thành một glyph duy …
Dạng chữ hoa ở chiều cao của chữ thường. CSS: font-variant: small-caps. …
CSS @font-face descriptor specifying which Unicode code points a font should cover. …
U+2026 HORIZONTAL ELLIPSIS (…). Một ký tự duy nhất thay thế ba …
Cặp dấu chấm câu bao quanh lời nói trực tiếp hoặc trích …
Dấu được thêm vào chữ cái để thay đổi cách phát âm …
Em: chiều rộng bằng kích thước phông chữ. En: bằng một nửa …
The mechanism by which a rendering engine substitutes glyphs from a secondary …
Dấu chấm câu dùng để phân tách các phần của câu hoặc …
Điều chỉnh khoảng cách giữa các cặp ký tự cụ thể để …