Font Feature Registry



This document describes the feature registry from several points of view, including the font designer, the user, and the application developer. For more information on presenting features to users, please consult the Font Human Interface Guidelines.

The designer/user model



The All Typographic Features feature type allows the user to specify whether or not any effects should occur. It is an all or nothing bit--if off, all other specifications are ignored. This feature might be turned off by a GX user who receives a document from a non-GX user and wants to ensure that the document does not reflow.



The Ligatures feature type permits selection from different ranges of ligatures. The Required selector should only be used for those ligatures that are linguistically required (such as occur in Arabic). The Common selector can be used for the ligatures that usually appear in well-set text. The Rare selector can be used to include ligatures in a font that are less common than those included in the Common category. The Logos selector can be used to include ligatures representing logos (e.g. trademarks). The Rebus Pictures selector can be used to include ligatures that are pictures representing words or syllables. The Diphthong Ligatures setting is used to specify automatic creation of ligatures like Æ.



The Cursive Connection feature type is used for cursively-connected scripts. It is required for Arabic, but may be used for other scripts as well. The Unconnected selector disables cursive connection altogether. The Partially Connected selector can be used to select pre-drawn letterforms that connect in a non-contextual manner (look at the "Swing" font, for example). The Cursive selector is used to select full, contextual connection of letterforms. This setting will be the default in Arabic fonts.



The Letter Case feature type is used to specify changes to the case of letters (in scripts where case has meaning), in either a contextual or a non-contextual manner. The Upper & Lower Case selector is the default setting and leaves letters in whichever case the user has specified. The All Caps and All Lower Case selectors convert all letters (non-contextually) to the specified form. The Small Caps selector specifies conversion of lower-case letters to small caps forms. The Initial Caps selectors--the only contextual selectors in this group--specify conversion of lower-case letters at the beginnings of words into upper-case.



The Vertical Substitution feature type can be used to specify that glyphs need to change their appearance in vertical runs of text.



The Linguistic Rearrangement feature type specifies whether linguistic rearrangement of glyphs (such as happens in South Asian scripts) should happen. It is on by default for fonts representing these scripts.



The Number Spacing feature type specifies a choice for the appearance of digits. Monospaced Numbers are of uniform width and are useful for displaying in columns, while Proportional Numbers may have individual widths.



The Smart Swashes feature type controls contextual swash substitution. The first 4 selectors control swashes that get substituted at the beginnings or ends of words or whole lines. The Archaic Non-Finals selector specifies forms that are used at the beginning or middle of words--archaic s can be specified this way.



The Diacritics feature type allows control over how diacritics (i.e. accent marks or applied vowels) appear in text. The default selector is Show Diacritics. The Hide Diacritics selector means to not show the marks. This is useful in Arabic children's book text, where the same text can be shown with vowels for one reading audience and without vowels for another. The Decompose Diacritics selector means to not attach the marks, but rather to place them in-line with the rest of the text.



The Vertical Position feature type controls things like superscripts and subscripts. The Superiors and Inferiors selectors are used to map to alternate glyph forms, positioned differently with respect to the baseline. The Ordinals selector is used to contextually change attached ordinal marks into superior forms.



The Fractions feature type controls the selection and/or generation of fractions. The No Fractions selector specifies that fractions should not be formed automatically. The Vertical Fractions selector will form vertical (pre-drawn) fractions present in the font. The Diagonal Fractions selector acts as the Vertical Fractions selector does, but in addition fractions will be synthesized using superiors and inferiors.



The Overlapping Characters feature type permits the user to prevent the collision of long tails on characters with other characters.



The Typographic Extras feature type represents a collection of effects that are associated with fine typography. The Hyphens to Em Dash selector causes two adjacent hyphens to change into a single em dash. The Hyphen to En Dash selector changes the hyphen in a space-hyphen-space or digit-hyphen-digit group into an en dash. The Unslashed Zero selector makes sure the unslashed zero is always used (even if the font designates the slashed zero as default), of course assuming the unslashed zero actually exists in the font. The Form Interrobang option maps the strings `?!' or `!?' to the interrobang (if present in the font). The Smart Quotes selector contextually replaces straight quotes with curly quotes.



The Mathematical Extras feature type represents a collection of effects useful in setting figures and mathematics. The Hyphen To Minus selector changes the hyphen in a space-hyphen-space or digit-hyphen-digit group into a minus (note this overrides the effect of the Hyphen to En Dash selector in the Typographic Extras feature type). The Asterisk to Multiply selector changes the * in a space-*-space group into a multiplication sign. The Slash to Divide selector changes the / in a space-/-space group into a stacked divide glyph. The Inequality Ligatures selector changes the >= sequence into a stacked >= glyph and the <= sequence into a stacked <= glyph. The Exponents selector takes digits immediately following a ^ and changes them into their superior forms.



The Ornament Sets feature type specifies non-letter ornament sets of glyphs. For example, fleurons or decorative borders could be represented by this feature type. The None selector means to do no simple ornament mapping. The Dingbats selector chooses miscellaneous symbols such as arrows, stars, and pointing hands used for occasional emphasis in display. The Pi Characters selector chooses a set of related symbols designed for a particular purpose (e.g. cartography or musical notation) which do not make up a formal alphabet. The Fleurons selector chooses ornaments in the shape of flowers, vine leaves, and so on. The Decorative Borders selector chooses glyphs designed to be used in interlocking or repeating patterns as borders for text. The International Symbols selector chooses glyphs representing standard, internationally-recognizable icons (for example, the circle with the bar through it representing "no..."). The Math Symbols selector chooses special symbols used in setting mathematics or logic text.



The radio button selectors for this type simply select different sets of glyphs in a font. For example, a font with twenty ampersands could place them in twenty selectors under this feature type. Use of the Style Options feature type is, however, preferred when feasible. The first setting for this feature should be "No Alternates".



The Design Complexity feature type controls the overall appearance of the font. It can be used to allow a single font to contain plain glyphs, italic glyphs, calligraphic chancery glyphs, etc. Design Level 1 should be available for any font which utilizes this feature type, and it should generally be the default setting. The remaining design levels progress from simplest to most complex.



The Style Options feature type allows the font designer to group together collections of non-contextual substitutions into named sets. If plain text is desired, the No Style Options feature selector should be chosen. The Display Text selector chooses glyphs designed to emphasize the unique appearance of the design at display sizes, typically above 24 point. The Engraved Text selector chooses glyphs with contrasting strokes parallel to the main strokes, particularly those designed to look like they're engraved in stone. The Illuminated Caps selector chooses capital letter glyphs with decoration filling the white space surrounding the glyph, in the manner used by medieval scribes. The Titling Caps selector specifies conversion of capital letters to a special titling form. The Tall Caps selector specifies conversion of certain capital letters into taller forms.



The Character Shape feature type is primarily for use with Chinese fonts to specify the use of the Traditional or Simplified character forms. In unusual cases in which no other feature type seems appropriate, Character Shape might be used with other, possibly Roman, fonts to include multiple forms of the same character (e.g., two different forms of "A", the simplified version of which might not have a crossbar).



Number Case is independent of Letter Case. Lower Case Numbers (also called "traditional" or "old style") are digits which may descend below the baseline, as opposed to Upper Case Numbers (also called "lining"), which do not descend below the baseline.



The Text Spacing feature type is used to select between the proportional and monospaced forms of letters in a font. Note that it is separate from the Number Spacing type, which just controls digits.

The application interface

This section gives the C language interface that applications use to support the feature types and selectors listed above.

enum {
 
  allTypographicFeaturesType = 0,
  
    allTypeFeaturesOnSelector            = 0,
    allTypeFeaturesOffSelector           = 1,
  
  ligaturesType = 1,
  
    requiredLigaturesOnSelector          = 0,
    requiredLigaturesOffSelector         = 1,
    commonLigaturesOnSelector            = 2,
    commonLigaturesOffSelector           = 3,
    rareLigaturesOnSelector              = 4,
    rareLigaturesOffSelector             = 5,
    logosOnSelector                      = 6,
    logosOffSelector                     = 7,
    rebusPicturesOnSelector              = 8,
    rebusPicturesOffSelector             = 9,
    diphthongLigaturesOnSelector        = 10,
    diphthongLigaturesOffSelector       = 11,
  
  cursiveConnectionType = 2,
  
    unconnectedSelector                 = 0,
    partiallyConnectedSelector          = 1,
    cursiveSelector                     = 2,
  
  letterCaseType = 3,
  
    upperAndLowerCaseSelector           = 0,
    allCapsSelector                     = 1,
    allLowerCaseSelector                = 2,
    smallCapsSelector                   = 3,
    initialCapsSelector                 = 4,
    initialCapsAndSmallCapsSelector     = 5,
  
  verticalSubstitutionType = 4,
  
    substituteVerticalFormsOnSelector   = 0,
    substituteVerticalFormsOffSelector  = 1,
  
  linguisticRearrangementType = 5,
  
    linguisticRearrangementOnSelector   = 0,
    linguisticRearrangementOffSelector  = 1,
  
  numberSpacingType = 6,
  
    monospacedNumbersSelector           = 0,
    proportionalNumbersSelector         = 1,
 
  appleReserved1Type = 7,
 
  smartSwashType = 8,
  
    wordInitialSwashesOnSelector        = 0,
    wordInitialSwashesOffSelector       = 1,
    wordFinalSwashesOnSelector          = 2,
    wordFinalSwashesOffSelector         = 3,
    lineInitialSwashesOnSelector        = 4,
    lineInitialSwashesOffSelector       = 5,
    lineFinalSwashesOnSelector          = 6,
    lineFinalSwashesOffSelector         = 7,
    nonFinalSwashesOnSelector           = 8,
    nonFinalSwashesOffSelector          = 9,
  
  diacriticsType = 9,
  
    showDiacriticsSelector              = 0,
    hideDiacriticsSelector              = 1,
    decomposeDiacriticsSelector         = 2,
  
  verticalPositionType = 10,
  
    normalPositionSelector              = 0,
    superiorsSelector                   = 1,
    inferiorsSelector                   = 2,
    ordinalsSelector                    = 3,
  
  fractionsType = 11,
  
    noFractionsSelector                 = 0,
    verticalFractionsSelector           = 1,
    diagonalFractionsSelector           = 2,
  
  appleReserved2Type = 12,
  
  overlappingCharactersType = 13,
  
    preventOverlapOnSelector            = 0,
    preventOverlapOffSelector           = 1,
  
  typographicExtrasType = 14,
  
    hyphensToEmDashOnSelector           = 0,
    hyphensToEmDashOffSelector          = 1,
    hyphenToEnDashOnSelector            = 2,
    hyphenToEnDashOffSelector           = 3,
    unslashedZeroOnSelector             = 4,
    unslashedZeroOffSelector            = 5,
    formInterrobangOnSelector           = 6,
    formInterrobangOffSelector          = 7,
    smartQuotesOnSelector               = 8,
    smartQuotesOffSelector              = 9,
  
  mathematicalExtrasType = 15,
  
    hyphenToMinusOnSelector             = 0,
    hyphenToMinusOffSelector            = 1,
    asteriskToMultiplyOnSelector        = 2,
    asteriskToMultiplyOffSelector       = 3,
    slashToDivideOnSelector             = 4,
    slashToDivideOffSelector            = 5,
    inequalityLigaturesOnSelector       = 6,
    inequalityLigaturesOffSelector      = 7,
    exponentsOnSelector                 = 8,
    exponentsOffSelector                = 9,
  
  ornamentSetsType = 16,
  
    noOrnamentsSelector                 = 0,
    dingbatsSelector                    = 1,
    piCharactersSelector                = 2,
    fleuronsSelector                    = 3,
    decorativeBordersSelector           = 4,
    internationalSymbolsSelector        = 5,
    mathSymbolsSelector                 = 6,
  
  characterAlternativesType = 17,
  
    noAlternatesSelector                = 0,
    
  designComplexityType = 18,
  
     designLevel1Selector               = 0,
     designLevel2Selector               = 1,
     designLevel3Selector               = 2,
     designLevel4Selector               = 3,
     designLevel5Selector               = 4,
  
  styleOptionsType = 19,
  
     noStyleOptionsSelector             = 0,
     displayTextSelector                = 1,
     engravedTextSelector               = 2,
     illuminatedCapsSelector            = 3,
     titlingCapsSelector                = 4,
     tallCapsSelector                   = 5,
  
  characterShapeType = 20,
  
     traditionalCharactersSelector      = 0,
     simplifiedCharactersSelector       = 1,
 
  numberCaseType = 21,
  
    lowerCaseNumbersSelector            = 0,
    upperCaseNumbersSelector            = 1,
 
  textSpacingType = 22,
 
    proportionalTextSelector            = 0,
    monospacedTextSelector              = 1,
 
  lastFeatureType = -1
};




Arleigh Movitz (movitz@applelink.apple.com)
Dave Opstad (opstad@apple.com)