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


How the Lao shaping engine works

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

  1. Analyzing the characters for valid diacritic combinations.
  2. Shaping (substituting) glyphs with OTLS (OpenType Library Services).
  3. Positioning glyphs with OTLS.

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


Analyzing the characters

The unit that the shaping engine receives for the purpose of shaping is a string of Unicode characters, in a sequence. The contextual analysis engine verifies valid diacritic combinations. For additional information see Other Encoding Issues; 'Handling invalid combining marks' in this document.

The handling of the AM in the analysis phase is special. In the case where an above mark does not exist on the preceding base consonant, the 'ccmp' feature will be used to decompose the AM into the NIGGAHITA and AA glyphs. This allows the NIGGAHITA glyph to be positioned correctly above the preceding base consonant. If there is a tone mark on the base consonant already, the analysis engine will decompost the AM and reorder the NIGGAHITA to between the base consonant and the tone mark. This allows the NIGGAHITA glyph to be positioned correctly above the base consonant and the tone mark to be positioned correctly above the NIGGAHITA. This behavior cannot be tested in VOLT as this logic is not in VOLT.


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 OTLS to apply the features. All OTL processing is divided into a set of predefined features (described and illustrated in the Features 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 OTL Services 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 or decomposition.


Positioning glyphs with OTLS

Uniscribe next applies features concerned with positioning, calling functions of OTLS to position glyphs.

Positioning features:

  1. Kerning
    1. Apply feature 'kern' to provide pair kerning between base glyphs requiring adjustment for better typographical quality.

  2. Mark to base
    1. Apply feature 'mark' to position diacritic glyphs to the base glyph.

  3. Mark to mark
    1. Apply feature 'mkmk' to position diacritic glyphs to other diacritic glyphs.



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

 

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