Microsoft Typography | Developer information | Specifications | OpenType font development
Hangul OpenType Specification | Terms | Shaping | Features | Other | Appendix


How the Korean Hangul shaping engine works

The Uniscribe Korean shaping engine processes text in stages. The stages are:

  1. Compose Old Hangul Jamo combinations
  2. Identify syllable boundaries
  3. Analyzing the syllables.
  4. Shaping glyphs with OTLS (OpenType Library Services).

The descriptions which follow will help font developers understand the rationale for the Korean Hangul feature encoding model, and help application developers better understand how layout clients can divide responsibilities with operating system functions.


Compose Old Hangul Jamo combinations

The shaping engine receives a sequence of characters (character run), which have been identified into sequences of leading consonant (L), vowel (V) and trailing consonant (T) Jamos. In each of these sequences, the shaping engine identifies the maximum length of characters which can combine to form registered Jamos. This is done according to the list of standard character combinations in Appendix B.

Next, it replaces these with the corresponding old Hangul Jamo. This process is repeated on the next longest string in the sequence. This process of identification and replacement is repeated for all sequences.

The result of the above steps is a string of registered Old Hangul Jamos:

V1L1L2L3V2V3T1T2T3L4L5V4T4V5V6L6V7

---> V1L1(L2L3)V2V3(T1T2T3)L4L5V4T4(V5V6)L6V7

---> V1L1(L23)V2V3(T123)L4L5V4T4(V56)L6V7


Identify syllable boundaries

The shaping engine now identifies syllable boundaries. A syllable could contain one of the following sequences:

  • {L} + (V) + {T}
  • (L) + (V)
  • (V) (filler / null consonant case)

Syllable boundaries are based on the following rules:

  • Break between a Jamo and non-Jamo character; (L.X, V.X, T.X, X.L, X.V, or X.T)
  • Break between a Vowel and Leading Jamo; (V.L)
  • Break between a Trailing Jamo and Leading Jamo; (T.L)
  • Break between a Trailing Jamo and Vowel; (T.V)

Note: Each pre-composed Modern Hangul syllable will be considered as a single unit for establishing syllable boundaries, and the shaping engine will not use any OpenType to shape this.


Analyzing the syllables

The syllable unit that the shaping engine receives for the purpose of shaping is a string of Unicode characters, in a sequence. Since each Hangul syllable has the canonical format of LVT, fillers Lf and Vf, are then added, where required, in the registered Jamo sequence to convert each of them to canonical form. The shaping engine then flags each of these for appropriate feature processing. OTLS will now be called to perform OpenType layout processing for each syllable in turn.

It is important to note that if any of the Jamo sequences being analyzed is capable of forming a Modern Hangul Syllable, the shaping engine does not apply OpenType features to shape them. Composition of Modern Hangul syllables is expected to be done using the pre-composed section (U+AC00 – U+D7AF) as described in the Unicode Standard.


Shaping with OTLS

The first step Uniscribe takes in shaping the character string is to map all characters to their nominal form glyphs.

Next, Uniscribe calls the OTL Services Library to shape the Old Hangul syllable. All OTLS processing is divided into a set of predefined features (described and illustrated in the ‘Feature’ section of this document). Each feature is applied, one by one, to the appropriate glyphs in the syllable and OTLS processes them. Uniscribe makes as many calls to the OTLS as there are features. This ensures that the features are executed in the desired order.

The steps of the shaping process are outlined below.

Shaping features:

  1. Language forms
    1. Apply feature 'ccmp' to preprocess any glyphs that require composition.
    2. Apply feature 'ljmo' to get the leading consonant Jamo.
    3. Apply feature 'vjmo' to get the vowel Jamo.
    4. Apply feature 'tjmo' to get the trailing consonant Jamo.



this page was last updated 7 April 2003
© 2003 Microsoft Corporation. All rights reserved. Terms of use.
comments to the MST group: how to contact us

 

Hangul OpenType Specification | Terms | Shaping | Features | Other | Appendix
Microsoft Typography | Developer information | Specifications | OpenType font development