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


Features for the Gurmukhi script

The features listed below have been defined to create the basic forms for the languages that are supported on Gurmukhi systems. Regardless of the model an application chooses for supporting layout of complex scripts, Uniscribe requires a fixed order for executing features within a run of text to consistently obtain the proper basic form. This is achieved by calling features one-by-one in the standard order listed below.

The order of the lookups within each feature is also very important. For more information on lookups and defining features in OpenType fonts, see Encoding feature information in the OpenType font development section.

The standard order for applying Gurmukhi features encoded in OpenType fonts:

Feature Feature function Layout operation Required
Language based forms:
nukt Nukta form GSUB X
blwf Below-base form GSUB X
pstf Post-base form GSUB X
vatu Vattu variants GSUB X
Conjuncts & typographical forms:
pres Pre-base substitution GSUB X
abvs Above-base substitution GSUB X
blws Below-base substitution GSUB X
psts Post-base substitution GSUB X
Halant forms:
haln Halant form substitution GSUB X
Positioning features:
abvm Above-base mark positioning GPOS
blwm Below-base mark positioning GPOS
dist Distances GPOS
       
[GSUB = glyph substitution, GPOS = glyph positioning]


Descriptions and examples of above features


Nukta

Feature Tag: "nukt"

This feature takes nominal (full) forms of consonants and produces nukta forms:

Cf + Nukta -> Kf-nukta

The nukta alters the way a preceding consonant is pronounced. Many of the nukta forms have been defined as separate glyphs in Unicode, with their own code points.

All nukta forms must be based on an input context consisting of the full form of consonants. All consonants in a font must have an associated nukta form, and nukta forms must exist in the font for all glyphs with akhand forms as well.

As a user types each character, the text-processing application will reshape the glyph or glyph cluster, which is displayed, as illustrated below.

Example of the "nukt" feature applied:


Below-base form

Feature Tag: "blwf"

Applying this feature produces below-base forms of consonants. These forms include the Gurmukhi 'Ra'.

Kf + H -> Ks

The input context for the 'below-base form' feature must always consist of the full form of the consonant + Halant.

The feature 'below-base form' is applied to consonants having below-base forms and following the base consonant. The exception is vattu, which may appear below half forms as well as below the base glyph. The feature 'below-base form' will be applied to all such occurrences of Ra as well.

If a ligature is required between the vattu glyph and the preceding consonant, it will be handled by the feature 'Vattu Variants'.

As a user types each character, the text-processing application will reshape the glyph or glyph cluster, which is displayed, as illustrated below.

Example of the "blwf" feature applied:


Post-base form of consonant

Feature Tag: "pstf"

Applying this feature gives us post-base forms.

Kf + H -> Kp

Example of the "pstf" feature applied:


Vattu variants

Feature Tag: "vatu"

Vattu variants are formed when combining consonants with the vattu mark. Vattu ligatures can be either half or full form, and fonts must contain both.

Kh + V -> Lh-vattu

Kf + V -> Lf-vattu

Vattu is a below-base form of Ra that can occur (and form ligatures) anywhere in the syllable and not just after the base glyph. Since it is an exception we treat it here as such.

The input context for the 'vattu variants' feature must always consist of a consonant (in full or half form) + vattu glyph.

Very often a specific, context-dependent shape is required when vattu mark is combining with other consonants. We advise font developers to form ligatures of the consonant with the vattu glyph in all such cases, with lookup formats shown above.

The vatu feature applied.

The vatu feature applied.

Conjuncts and typographical forms

Feature Tags: "pres", "abvs", "blws", "psts"

All previous features have dealt with language features only, dedicated to forming glyph shapes dictated by the languages. The remaining shaping features cover optional features.

These optional features range from those that will exist in every font to rare typographical ornaments. It is important to stress that all features operate only within one orthographic syllable.

Since the language features do not limit typographical processing , Uniscribe passes the entire syllable to the OTL Services library. Uniscribe does not strictly specify the format of lookup tables to use or their inputs, allowing for context-dependent processing of any of the conjuncts and forms below.

The OTL Services library processes the syllable "left to right", executing lookups in the order that they are specified in the font. First, pre-base substitutions will be handled, then below-base, above-base and then post-base substitutions.

Therefore a font developer should first take care of all ligatures to the left of the base glyph and then working to the right, substite below-bases, above-bases and then finally post-base elements. The lookups in the font should be ordered in the same way.

With every new element and feature, the following operations should be considered, as appropriate, in this order:

  • Ligatures with the base glyph
  • Ligatures with preceding (in the canonical syllable form below) elements, and
  • Contextual forms of the element

At every feature step, one should take into account all ligatures and forms that were produced by previous steps.

In general, at this point the syllable being shaped will have one of the following forms:


For Gurmukhi:

[Mpre] + {Kh} + Kf +

[Ks] + [Mbelow] +

[Mabove] + [Kp] + [Mpost] + [VMabove]

(Only one of Mpre, Mbelow, Mabove or Mpost can be present)

In the absence of a vowel we have

{Kh} + Kf + [V] + H

Finally, a syllable with independent vowel will look like

VO + [VM1] + [SM]


Pre-base substitutions

Feature Tag: "pres"

Pre-base consonant conjuncts

This feature produces conjuncts with half forms. Gurmukhi, does not use half forms of consonants to display conjuncts as seen in Gujarati or Devanagari. If needed, the halant form can be used instead. Ligatures for conjuncts in this script are few.

Pre-base Matra substitutions

This feature produces the correct shape of I-Matra. For example,

Mpre + {Kh} + Kf -> correct form of Mpre or a ligature

Mpre + {Kh} + Lf -> correct form of Mpre or a ligature


Above-base substitutions

Feature Tag: "abvs"

Above-base Matra ligatures

This feature produces the correct typographic shape when an above-base matra forms a ligature with the base glyph.


Above-base vowel modifiers

This feature also produces ligatures and forms involving above-base vowel modifiers.

Example:

Above-Base Stress and Tone Marks

This feature can also be used to produces the correct form of stress or tone mark signs above the base glyph.


Below-base substitutions

Feature Tag: "blws"

Below-base consonant conjuncts

This feature produces conjuncts of the base glyph with below-base consonants. For example,

Kf + {Ks} -> Lf

Specific context-dependent forms or below-base consonants are handled by this lookup as well.


Below-base Matra substitutions

This feature produces matra ligatures with the base consonants. For example,

Kf + Msub -> Ligature

Lf + Msub -> Ligature

In the presence of below-base consonants, the below-base matra can be used for a ligature with them or change shape as well.

Example:


Below-base Stress and Tone Marks

This feature produces the correct form of stress and tone mark signs that below the base glyph or ligatures.


Post-base substitutions

Feature Tag: "psts"

Post-base Matra substitutions

This feature produces the correct typographic shape when a post-base matra forms a ligature with the base glyph. It can also be used to substitute the appropriate matra (eg. Gurmukhi Ii-matra) variant based on context.

Note: This feature will be executed prior to any 'above-base' features.

Post-base vowel modifiers

This feature also can be used to produce different forms of post-base vowel modifiers.


Halant form of consonants

Feature Tag: "haln"

This feature produces the halant form of the base glyph in syllables ending with a halant.

Kf + H -> Khalant

Lf + H -> Lhalant

Halant forms can also be created by positioning the halant as a below-base mark on the base glyph.

This feature is applied only on the base glyph and the following halant.

"Halant Form of Consonant" feature applied:


Above-base marks

Feature Tag: "abvm"

This feature positions all above-base marks on the base glyph or the post-base matra. The best method for encoding this feature in an OpenType font is to use a chaining context positioning lookup that triggers mark-to-base and mark-to-mark attachments for below-base marks.

"Above-base marks" feature applied (shaded box)


Below-base marks

Feature Tag: "blwm"

This feature positions all below-base marks on the base glyph. The best method for encoding this feature in an OpenType font is to use a chaining context positioning lookup that triggers mark-to-base and mark-to-mark attachments for below-base marks.

"Below-base marks" feature applied (shaded box)


Distances

Feature Tag: "dist"

This feature covers all other positioning lookups defining various distances between glyphs, such as kerning between pre- and post-base elements (like Visarga) and the base glyph.



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

 

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