너비 없는 문자
전진 너비가 0인 문자 — 렌더링에서 보이지 않지만 텍스트 동작에 영향을 줍니다. ZWSP(단어 경계), ZWJ(결합), ZWNJ(결합 방지), WJ(줄 바꿈 방지) 등이 있습니다.
What is a Zero-Width Character?
A zero-width character is a Unicode character that occupies no visual space when rendered — it is invisible, produces no glyph, and has zero advance width. Despite being invisible, zero-width characters have important semantic functions: they control how text is broken, joined, or displayed. They are essential for correct rendering of Arabic, Hebrew, Indic scripts, and for controlling ligature formation across all scripts.
The three most important zero-width characters are the Zero-Width Joiner (ZWJ), Zero-Width Non-Joiner (ZWNJ), and Zero-Width Space (ZWSP).
The Main Zero-Width Characters
| Character | Unicode | Name | Purpose |
|---|---|---|---|
| ZWJ | U+200D | Zero Width Joiner | Forces joining/ligature between adjacent characters |
| ZWNJ | U+200C | Zero Width Non-Joiner | Prevents joining/ligature between adjacent characters |
| ZWSP | U+200B | Zero Width Space | Allows line break without visible space |
| WJ | U+2060 | Word Joiner | Prevents line break (like NBSP but zero-width) |
| SHY | U+00AD | Soft Hyphen | Invisible hyphenation hint; shows hyphen only if line breaks there |
| BOM | U+FEFF | Byte Order Mark / ZWNBSP | File encoding marker; zero-width non-break space in older usage |
Zero Width Joiner (ZWJ)
The ZWJ (U+200D) tells the text shaping engine to use a joined or ligature form between the surrounding characters, even when they would not normally join.
The most famous modern use is emoji sequences. Many complex emoji are encoded as sequences of simpler emoji joined by ZWJ:
| Sequence | Result |
|---|---|
| 👨 + ZWJ + 💻 | 👨💻 (man technologist) |
| 👩 + ZWJ + ❤️ + ZWJ + 👩 | 👩❤️👩 (couple with heart) |
| 🏳️ + ZWJ + 🌈 | 🏳️🌈 (rainbow flag) |
In Arabic, ZWJ can force a letter into its final-form shape even at mid-word, and in Indic scripts it controls how consonant clusters are rendered.
Zero Width Non-Joiner (ZWNJ)
The ZWNJ (U+200C) has the opposite effect: it breaks joining that would otherwise occur. In Arabic and Persian script, letters normally join to form cursive words — but ZWNJ between two letters prevents them from connecting, showing each in its isolated form. In Indic scripts, ZWNJ prevents conjunct consonant formation.
Example: In Persian, the word "میروم" (I go) uses a ZWNJ after "می" to keep it visually separate from "روم" while still being one word (no space, but no joining).
Zero Width Space (ZWSP)
The ZWSP (U+200B) is invisible and zero-width, but it marks a position where a line break is permitted. It is used in scripts that don't use spaces to separate words — such as Thai, Lao, Khmer, and Tibetan — to give the text renderer a hint about where to break long lines.
It is also used in URLs and long technical strings in HTML to allow wrapping without adding a visible space.
Security Concerns
Zero-width characters are invisible, which makes them exploitable: - Text spoofing: inserting ZWJ/ZWNJ into usernames to create visually identical but technically different strings - Hidden watermarks: embedding patterns of zero-width characters as steganographic markers - Homograph attacks: combined with lookalike characters
Sanitize user input by stripping unexpected zero-width characters from identifiers and URLs.
Quick Facts
| Property | Value |
|---|---|
| Zero Width Joiner | U+200D — forces joining/ligature |
| Zero Width Non-Joiner | U+200C — prevents joining |
| Zero Width Space | U+200B — invisible line-break opportunity |
| Word Joiner | U+2060 — prevents line break (zero-width) |
| Soft Hyphen | U+00AD — visible only when line breaks there |
| ZWJ in emoji | Used in 1,000+ multi-person and multi-component emoji |
| Security risk | Can create invisible text or spoofed identifiers |
| Detection in Python | '\u200d' in text or regex [\u200b-\u200d\ufeff] |
관련 용어
타이포그래피의 더 많은 용어
CSS @font-face descriptor specifying which Unicode code points a font should cover. …
Em: 폰트 크기와 같은 너비. En: Em의 절반. 엠 대시 너비, 엠 …
The mechanism by which a rendering engine substitutes glyphs from a secondary …
Modern font format developed by Microsoft and Adobe supporting up to 65,535 …
문자가 오른쪽에서 왼쪽으로 흐르는 텍스트 방향. 아랍어, 히브리어, 타아나 문자 등에서 사용되며, …
Fonts downloaded by the browser to render text, declared via CSS @font-face. …
앞의 기본 문자에 붙어 수정하는 문자. 일반 범주: Mn(비공백), Mc(공백 결합), Me(둘러싸기). …
가로 또는 세로 공간을 표현하지만 눈에 보이는 글리프가 없는 문자. 유니코드는 서로 …
폰트가 렌더링하는 문자의 시각적 표현. 하나의 문자가 여러 글리프를 가질 수 있고(합자, …
문장의 일부를 구분하거나 범위를 나타내는 데 사용되는 구두점. 유니코드는 하이픈(‐), 엔 대시(–), …