Since the amount of content on a line tends to vary,
even if minutely, from line to line within a paragraph,
typographers have come up with various methods
for effective full justification—
Typographic conventions for full text justification depend on the writing system, the content language, and the calligraphic style of the text. Results also tend to vary based on the capabilities of the layout engine and a given typographer’s preferences for weighing its various detrimental effects on typographic color and readability.
This document collects together references for further information on the typographic conventions for full justification as they apply to the various writing systems around the world, together with some guidance for implementers handling unpredictable Web content. (General information and technical requirements for CSS are described under the Justification section of [CSS3TEXT].)Additional information and references are hereby solicited; please send any suggestions for additions, clarifications, corrections, and other improvements to the W3C Internationalization Working Group at firstname.lastname@example.org.
Note: Information on which languages use which writing systems is maintained in the Unicode CLDR.
2.1. Chinese Writing System (Han Ideographs)
Historically, Chinese was written as Han ideographs, with no punctuation. Under this system, justification was automatic, as the characters fit perfectly into a square grid. However, the introduction of punctuation in recent centuries, plus the increase in mixed-script text (such as the inclusion of European numbers and/or words, phrases, names, and trademarks) has created a need for adjustments within a line.
Chinese notably does not use word spaces, so these do not provide a justification opportunity within the lines; thus justification techniques focus on adjustments to spacing around punctuation, script-change boundaries, and inter-character spacing.
- Chinese Layout Requirements: Line Composition Rules for Punctuation Marks
- Chinese Layout Requirements: Composition of Chinese and Western Mixed Texts
2.2. Japanese Writing System
Like Chinese, Japanese was historically written in Han ideographs; however it has since developed its own phonetic scripts Hiragana and Katakana (collectively, Kana). While pure kana texts do exist, particularly in children’s literature, Han ideographs (Kanji, in Japanese) continue to be an integral part of normal Japanese text, and are interspersed with kana within a sentence.
Like Chinese, embraced European-inspired punctuation, numerals, and other foreign snippets that don’t conform to the standard full-width character grid. The Japanese writing system also does not use word spaces, and similarly focuses on adjustments to spacing around punctuation, script-change boundaries, and inter-character spacing, with a notable preference for compression of intra-glyph spacing over expansion between glyphs.
- Japanese Layout Requirements: Line Adjustment
- Japanese Layout Requirements: Opportunities for Inter-character Space Reduction during Line Adjustment
- Japanese Layout Requirements: Opportunities for Inter-character Space Expansion during Line Adjustment
2.3. Korean Writing System
Like Japanese, Korean was historically written in pure Han ideographs, and has since developed its own phonetic script, Hangul. Also like Japanese, it has adopted punctuation and numerals. However, unlike Japanese, Korean has also adopted word spaces, and tends towards narrow (Western-style, rather than full-width) punctuation. This allows it to use inter-word justification: as in English publications, this method stretches the spaces between words in order to fill the line.
While Han ideographs (Hanja, in Korean) were kept as part of the writing system, they have become increasingly scarce over time such that many documents are written in pure Hangul, and some only use Hanja as inline annotations for disambiguation among homophones rather than as part of the main text. However, Hanja and Hangul together remain important components of Korean writing.
- Hangul Layout Requirements: Paragraph Adjustment
- Hangul Layout Requirements: Line Adjustment Process
2.4. Latin (Roman) Writing System
Quite possibly the writing system familiar to more people than any other, the Latin writing system derives from the Roman alphabet, including a few additional characters and diacritic marks to accommodate languages such as Icelandic and modern Vietnamese. Thanks to the Europeans in the Age of Exploration, their missionaries, and the Western-dominated global scholastic culture of the modern age, most languages in the world have one or more Latin transcriptions, even those that do not use it as their primary writing system.
The Latin alphabet is a phonetic system with disjoint letterforms, and typically uses spaces between words. This allows it to use inter-word justification, although it can and sometimes does increase the spacing between individual letters as well. Since it is frequently adopted into other writing systems, it can sometimes adopt characteristics of that system; for example, some styles of Japanese typesetting treat Latin letters the same as Japanese characters for the purpose of line-breaking and justification.
2.5. Ethiopic Writing System
Like Latin, the Ethiopic writing system uses an alphabet of disjoint letters
and uses punctuation to indicate the break between words.
Unlike Latin, Ethiopic traditionally uses a visible word separator—
2.6. Arabic Writing System (and Other Cursive Systems)
Arabic is a cursive script,
meaning its letters are typically joined together within a word.
This creates additional challenges,
as the usual method for stretching out text—
Since Arabic uses spaces between words,
one method for justification is inter-word justification—
- Arabic Text Justification
- Justify Just or Just Justify (Arabic text justification)
- Typography questions for HTML & CSS: Arabic justification
- Rule-based expert system for Urdu nastaleeq justification
- Proposal to Reclassify Ethiopic Wordspace as a Space Separator (Zs) Symbol
Syriac and Mongolian have properties similar to Arabic, and in the absence of additional information should be given similar treatment for justification.
2.7. Tibetan Writing System
Tibetan is a Brahmic writing system related to Indic scripts like Devanagari and Gujarati; however, unlike these systems, it does not use Western-style punctuation nor spaces between words, and instead uses the Tibetan Tsheg Mark U+0F0B “་” between syllables and its own punctuation marks such as the Tibetan Shad U+0F0D “།” and Tibetan Nyis Shad U+ 0F0E “༎”, which indicate the end of longer segments.
Justification techniques used in Tibetan include stretching the space after a shad, minutely increasing the spaces after tsheg marks, and simply filling the remaining space on a line with tsheg marks.
2.8. Southeast Asian Writing Systems
In Southeast Asian systems such as Thai and Lao, letters are merged together into “clusters”. There are no spaces between words (lines must be broken by dictionary), but spaces serve to separate larger units of text.
Techniques for justification include stretching spaces on the line (if it happens to have any) and interspersing extra space between clusters.
Scripts in this category include Khmer, Myanmar, Lao, and Thai.
2.9. Other Writing Systems
Most (but not all) writing systems not mentioned here have discrete letters, like Latin, and in the absence of more specific information may be assumed to justify in a similar manner.
Note: Readers who wish to provide such “more specific information” are invited (and strongly encouraged) to contact the W3C Internationalization Working Group so that this document may be updated.
3. Guidance for Authors and Implementers
3.1. Tagging Content By Writing System
While most languages have a preferred writing system,
many can be transcribed into a different system.
As a common example, most languages have a Latin transcription,
and can thus be written in the Latin writing system.
In these cases the document typically adopts the typographic conventions of the Latin writing system:
for example Japanese “romaji” and Chinese Pinyin use word spaces and justify accordingly.
As another example, historical ideographic Korean
does not use word spaces,
and should therefore be justified as for Chinese.
Authors can indicate the use of the Latin writing system
-Latn language subtag,
ja-Latn for Japanese romaji.
Other subtags exist for other writing systems,
Some common/historical examples follow:
- Chinese, written in Latin transcription
- Korean, written in Hanja (Chinese ideographic characters)
- Turkish, written in Arabic script.
- Mongolian, written in Cyrillic
- Mongolian, written in traditional Mongolian script.
UAs should assume the most common writing system for a given language when choosing a justification strategy, but must not assume that writing system if the author has explicitly indicated a different one.
3.2. Justifying Untagged Content
Web browsers frequently have to deal with untagged, potentially mixed-script content. The following are some guidelines for designing a strategy to deal with such content.
- Since Chinese and Japanese do not use spaces to provide justification opportunities, CJK content (Han, Hiragana, Katakana, and Hangul) should be allowed to accept inter-character spacing.
- Since Japanese content prefers compression, CJK fullwidth punctuation characters, if present on a line, should be compressed at a higher priority (if possible) than expanding spaces or letter-spacing.
- Since Korean prefers expanding spaces to expanding between characters, spaces should be expanded at a higher priority (if possible) than letter-spacing.
This document was compiled with guidance from: the W3C Internationalization and CSS Working Groups, and the W3C Japanese, Chinese, Korean, and Ethiopic Language Task Forces.