Carbon


Font Feature Type Constants

Header: SFNTLayoutTypes.h

enum {
    kAllTypographicFeaturesType = 0,
    kAllTypeFeaturesOnSelector = 0,
    kAllTypeFeaturesOffSelector = 1,
    kLigaturesType = 1,
    kRequiredLigaturesOnSelector = 0,
    kRequiredLigaturesOffSelector = 1,
    kCommonLigaturesOnSelector = 2,
    kCommonLigaturesOffSelector = 3,
    kRareLigaturesOnSelector = 4,
    kRareLigaturesOffSelector = 5,
    kLogosOnSelector = 6,
    kLogosOffSelector = 7,
    kRebusPicturesOnSelector = 8,
    kRebusPicturesOffSelector = 9,
    kDiphthongLigaturesOnSelector = 10,
    kDiphthongLigaturesOffSelector = 11,
    kSquaredLigaturesOnSelector = 12,
    kSquaredLigaturesOffSelector = 13,
    kAbbrevSquaredLigaturesOnSelector = 14,
    kAbbrevSquaredLigaturesOffSelector = 15,
    kCursiveConnectionType = 2,
    kUnconnectedSelector = 0,
    kPartiallyConnectedSelector = 1,
    kCursiveSelector = 2,
    kLetterCaseType = 3,
    kUpperAndLowerCaseSelector = 0,
    kAllCapsSelector = 1,
    kAllLowerCaseSelector = 2,
    kSmallCapsSelector = 3,
    kInitialCapsSelector = 4,
    kInitialCapsAndSmallCapsSelector = 5,
    kVerticalSubstitutionType = 4,
    kSubstituteVerticalFormsOnSelector = 0,
    kSubstituteVerticalFormsOffSelector = 1,
    kLinguisticRearrangementType = 5,
    kLinguisticRearrangementOnSelector = 0,
    kLinguisticRearrangementOffSelector = 1,
    kNumberSpacingType = 6,
    kMonospacedNumbersSelector = 0,
    kProportionalNumbersSelector = 1,
    kSmartSwashType = 8,
    kWordInitialSwashesOnSelector = 0,
    kWordInitialSwashesOffSelector = 1,
    kWordFinalSwashesOnSelector = 2,
    kWordFinalSwashesOffSelector = 3,
    kLineInitialSwashesOnSelector = 4,
    kLineInitialSwashesOffSelector = 5,
    kLineFinalSwashesOnSelector = 6,
    kLineFinalSwashesOffSelector = 7,
    kNonFinalSwashesOnSelector = 8,
    kNonFinalSwashesOffSelector = 9,
    kDiacriticsType = 9,
    kShowDiacriticsSelector = 0,
    kHideDiacriticsSelector = 1,
    kDecomposeDiacriticsSelector = 2,
    kVerticalPositionType = 10,
    kNormalPositionSelector = 0,
    kSuperiorsSelector = 1,
    kInferiorsSelector = 2,
    kOrdinalsSelector = 3,
    kFractionsType = 11,
    kNoFractionsSelector = 0,
    kVerticalFractionsSelector = 1,
    kDiagonalFractionsSelector = 2,
    kOverlappingCharactersType = 13,
    kPreventOverlapOnSelector = 0,
    kPreventOverlapOffSelector = 1,
    kTypographicExtrasType = 14,
    kHyphensToEmDashOnSelector = 0,
    kHyphensToEmDashOffSelector = 1,
    kHyphenToEnDashOnSelector = 2,
    kHyphenToEnDashOffSelector = 3,
    kSlashedZeroOnSelector = 4,
    kSlashedZeroOffSelector = 5,
    kFormInterrobangOnSelector = 6,
    kFormInterrobangOffSelector = 7,
    kSmartQuotesOnSelector = 8,
    kSmartQuotesOffSelector = 9,
    kPeriodsToEllipsisOnSelector = 10,
    kPeriodsToEllipsisOffSelector = 11,
    kMathematicalExtrasType = 15,
    kHyphenToMinusOnSelector = 0,
    kHyphenToMinusOffSelector = 1,
    kAsteriskToMultiplyOnSelector = 2,
    kAsteriskToMultiplyOffSelector = 3,
    kSlashToDivideOnSelector = 4,
    kSlashToDivideOffSelector = 5
};

Constant descriptions

kAllTypographicFeaturesType

Specifies whether or not any font features are to be applied at all. “Font Feature Type Selector Constants” lists the feature selectors related to this feature type.

kAllTypeFeaturesOnSelector

Tells ATSUI to use the font features specified in this style run’s run-features array and the defaults specified by the font.

kAllTypeFeaturesOffSelector

Tells ATSUI to ignore all font features specified either by the font or in this style run’s run-features array.

kLigaturesType

Specifies the use of required ligatures and other categories of optional ligatures. “Ligature Font Feature Selector Constants” lists the feature selectors related to this feature type.

kRequiredLigaturesOnSelector

Allows the use of ligatures that the font designates as required by the language (such as certain Arabic ligatures).

kRequiredLigaturesOffSelector

Prevents the use of ligatures that the font designates as required by the language (such as certain Arabic ligatures).

kCommonLigaturesOnSelector

Allows the use of ligatures that the font designates as “common,” or normally used (such as the “fi” ligature in Roman text).

kCommonLigaturesOffSelector

Prevents the use of ligatures that the font designates as “common,” or normally used (such as the “fi” ligature in Roman text).

kRareLigaturesOnSelector

Allows the use of ligatures that the font designates as “rare” (such as “ct” or “ss” ligatures).

kRareLigaturesOffSelector

Prevents the use of ligatures that the font designates as “rare” (such as “ct” or “ss” ligatures).

kLogosOnSelector

Allows the use of ligatures that the font designates as logotypes (typically used for trademarks or other special display text).

kLogosOffSelector

Prevents the use of ligatures that the font designates as logotypes (typically used for trademarks or other special display text).

kRebusPicturesOnSelector

Allows the use of rebuses (pictures that represent words or syllables).

kRebusPicturesOffSelector

Prevents the use of rebuses (pictures that represent words or syllables).

kDiphthongLigaturesOnSelector

Specifies replacing diphthong sequences, such as “AE” and “oe”, with their equivalent ligatures (“AE” and “ae” in this case).

kDiphthongLigaturesOffSelector

Specifies not to replace diphthong sequences, such as “AE” and “oe”, with their equivalent ligatures (“AE” and “ae” in this case).

kSquaredLigaturesOnSelector

Allows the use of ligatures where the component letters are arranged in a lattice, such that the ligature fits into the space of a single letter. For examples, see Unicode characters U+3300 through U+3357 and U+337B through U+337F.

kSquaredLigaturesOffSelector

Prevents the use of ligatures where the component letters are arranged in a lattice, such that the ligature fits into the space of a single letter. For examples, see Unicode characters U+3300 through U+3357 and U+337B through U+337F.

kAbbrevSquaredLigaturesOnSelector

Allows the use of ligatures similar to the previously described ligatures, but in abbreviated form.

kAbbrevSquaredLigaturesOffSelector

Prevents the use of ligatures similar to the previously described ligatures, but in abbreviated form.

kCursiveConnectionType

Specifies whether or not cursive connections are to be used between glyphs. “Cursive Connection Font Feature Selector Constants” lists the feature selectors related to this feature type.

kUnconnectedSelector

Disables cursive connection.

kPartiallyConnectedSelector

Specifies noncontextual cursive connection.

kCursiveSelector

Specifies fully contextual cursive connection. For Arabic fonts, this selector is set by default.

kLetterCaseType

Specifies case changes, such as all uppercase, all lowercase, and small caps, for scripts in which case has meaning. “Letter Case Font Feature Selector Constants” lists the feature selectors related to this feature type.

kUpperAndLowerCaseSelector

Specifies no case conversion.

kAllCapsSelector

Specifies conversion of all letters to uppercase. (This feature is noncontextual.)

kAllLowerCaseSelector

Specifies conversion of all letters to lowercase. (This feature is noncontextual.)

kSmallCapsSelector

Specifies conversion of all lowercase letters to small caps. (This feature is noncontextual.)

kInitialCapsSelector

Specifies conversion of all lowercase letters at the beginnings of words to uppercase. (This feature is contextual.)

kInitialCapsAndSmallCapsSelector

Specifies conversion of all lowercase letters at the beginnings of words to uppercase, and all other lowercase letters to small caps. (This feature is contextual.)

kVerticalSubstitutionType

Specifies case changes, such as all uppercase, all lowercase, and small caps, for scripts in which case has meaning. “Vertical Substitution Font Feature Selector Constants” lists the feature selectors related to this feature type.

kSubstituteVerticalFormsOnSelector

Allows the substitution of alternate glyph forms in vertical lines.

kSubstituteVerticalFormsOffSelector

Prevents the substitution of alternate glyph forms in vertical lines.

kLinguisticRearrangementType

Either permits or inhibits linguistic (Indic-style) rearrangement of glyphs. “Linguistic Rearrangement Font Feature Selector Constants” lists the feature selectors related to this feature type.

kLinguisticRearrangementOnSelector

Allows the automatic rearrangement of certain glyphs as required by language rules.

kLinguisticRearrangementOffSelector

Prevents the automatic rearrangement of certain glyphs as required by language rules.

kNumberSpacingType

Specifies whether to use fixed-width or proportional-width glyphs for numerals. “Number Width Feature Selector Constants” lists the feature selectors related to this feature type.

kMonospacedNumbersSelector

Specifies the use of fixed-width (columnating) numerals.

kProportionalNumbersSelector

Specifies the use of proportional-width numerals.

kSmartSwashType

Controls whether swash variants of glyphs are to be substituted in specific places in the text, such as at the beginnings or ends of words or lines. “Swash Font Feature Selector Constants” lists the feature selectors related to this feature type.

kWordInitialSwashesOnSelector

Allows the substitution of swash variants that begin words.

kWordInitialSwashesOffSelector

Prevents the substitution of swash variants that begin words.

kWordFinalSwashesOnSelector

Allows the substitution of swash variants that end words.

kWordFinalSwashesOffSelector

Prevents the substitution of swash variants that end words.

kLineInitialSwashesOnSelector

Allows the substitution of swash variants that begin lines.

Font features are grouped into categories called feature types, within which feature selectors are used to define particular feature settings or selections. The set of feature types described in this section may not be complete. For a description of the most up-to-date set of registered typographic and layout features available to applications using Apple Advanced Typography (AAT), see the Font Feature Registry at the Apple Font Feature Registry web site:

.

Below are some of the feature types might be available in a font. You should query a font to determine which of these font features are available, then build your own list of font features.

Note that unless the feature is defaulted differently in different fonts, the zero value for the selectors represents the default value.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)