Skip to content

Latest commit

 

History

History
1150 lines (1129 loc) · 71.1 KB

File metadata and controls

1150 lines (1129 loc) · 71.1 KB

A breakdown of advanced font feature implementation issues

The OpenType, AAT, and Graphite font features present 3 implementation questions for application developers:

  • Which features should be enabled by default if they are present in the font
  • Which features should be activated automatically by context
  • Which features should be explicitly presented to the user in the user interface (see UI)

Defaults

Adobe, Microsoft, and FontLab's Adam Twardoch each have a set of recommendations as to which features ought to be activated by default. They are indicated with "on" against a green background in the following table.

Where features are marked with "shaper," the recommendation is to leave activation and usage of that feature up to the script-shaping library (e.g., HarfBuzz). Features marked "dependent" are dependencies of other, higher-level features and are not activated separately. Featured marked "contextual" depend on the context of the text or document to determine whether they should be enabled.

The three lists agree on most features; those where there are conflicts are discussed below in the conflicts section.

Tag Feature Default: Adobe Default: MS Default: Twardoch UI: Twardoch
aalt Access All Alternates off off off special
abvf Above-base Forms shaper shaper shaper
abvm Above-base Mark Positioning shaper shaper shaper
abvs Above-base Substitutions shaper shaper shaper
afrc Alternative Fractions off off off yes
akhn Akhands shaper shaper shaper
altv Alternate Vertical Metrics [deprecated]

off
blwf Below-base Forms shaper shaper shaper
blwm Below-base Mark Positioning shaper shaper shaper
blws Below-base Substitutions shaper shaper shaper
calt Contextual Alternates on on on yes
case Case-Sensitive Forms contextual contextual off yes
ccmp Glyph Composition / Decomposition on on on
cfar Conjunct Form After Ro
shaper shaper
cjct Conjunct Forms
shaper shaper
clig Contextual Ligatures on on on yes
cpct Centered CJK Punctuation
off

cpsp Capital Spacing on on off yes
crcy Currency [deprecated]

off
cswh Contextual Swash off off off yes
curs Cursive Positioning user user on
cv01-99 Character Variants
off off yes
c2pc Petite Capitals From Capitals off off off yes
c2sc Small Capitals From Capitals off off off yes
dflt Default processing [deprecated]

off
dist Distances shaper shaper shaper
dlig Discretionary Ligatures off off off yes
dnom Denominators dependent dependent off yes
dpng Dipthongs [deprecated]

off
dtls Dotless forms
dependent shaper
expt Expert Forms user user off yes
falt Final Glyph on Line Alternates user user off yes
fin2 Terminal Forms #2 shaper shaper shaper
fin3 Terminal Forms #3 shaper shaper shaper
fina Terminal Forms on on shaper special
flac Flattened Ascent Forms
contextual shaper
frac Fractions off off off yes
fwid Full Widths off off off yes
half Half Forms shaper shaper shaper
haln Halant Forms shaper shaper shaper
halt Alternate Half Widths off off off yes
hist Historical Forms off off off yes
hkna Horizontal Kana Alternates of off contextual special
hlig Historical Ligatures off off off yes
hngl Hangul off off off yes
hojo Hojo Kanji Forms (JIS X 0212-1990 Kanji Forms) off off off yes
hwid Half Widths off off off yes
init Initial Forms on on shaper special
isol Isolated Forms on on shaper special
ital Italics integrated integrated off yes
jajp Japanese Forms [deprecated]

off
jalt Justification Alternates user user off yes
jp78 JIS78 Forms off off off yes
jp83 JIS83 Forms off off off yes
jp90 JIS90 Forms off off off yes
jp03 JIS03 Forms [deprecated]

off
jp04 JIS2004 Forms off off off yes
kern Kerning on on on
kokr Korean Forms [deprecated]

off
lfbd Left Bounds dependent dependent on
liga Standard Ligatures on on on yes
ljmo Leading Jamo Forms shaper shaper shaper
lnum Lining Figures off off off yes
locl Localized Forms on on on special
ltra Left-to-right alternates
? bidi
ltrm Left-to-right mirrored forms
? bidi
mark Mark Positioning shaper shaper on
med2 Medial Forms #2
shaper on
medi Medial Forms on on shaper special
mgrk Mathematical Greek off off off yes
mkmk Mark to Mark Positioning on on on
mset Mark Positioning via Substitution shaper shaper on
nalt Alternate Annotation Forms off off off yes
nlck NLC Kanji Forms off off off yes
nukt Nukta Forms shaper shaper shaper
numr Numerators dependent dependent off yes
onum Oldstyle Figures off off off yes
opbd Optical Bounds on on on special
ordn Ordinals off off off yes
ornm Ornaments off off off yes
palt Proportional Alternate Widths off off off yes
pcap Petite Capitals off off off yes
pkna Proportional Kana
off off yes
pnum Proportional Figures off off off yes
pref Pre-Base Forms shaper shaper shaper
pres Pre-base Substitutions shaper shaper shaper
pstf Post-base Forms shaper shaper shaper
psts Post-base Substitutions shaper shaper shaper
pwid Proportional Widths user user off yes
qwid Quarter Widths off off off yes
rand Randomize user / on user / on off yes
rclt Required Contextual Alternates
on on
rkrf Rakar Forms
shaper shaper
rlig Required Ligatures on on on
rphf Reph Forms shaper shaper shaper
rtbd Right Bounds dependent dependent on
rtla Right-to-left alternates ? ? shaper
rtlm Right-to-left mirrored forms
?

ruby Ruby Notation Forms off off off yes
salt Stylistic Alternates off off off yes
sinf Scientific Inferiors off off off yes
size Optical size on on on special
smcp Small Capitals off off off yes
smpl Simplified Forms off off off yes
ss01-20 Stylistic Sets 1 to 20 off off off yes
ssty Math Script Style Alternates
dependent shaper
stch Stretching Glyph Decomposition
on

subs Subscript off off off yes
sups Superscript off off off yes
swsh Swash off off off yes
titl Titling off off off yes
tjmo Trailing Jamo Forms shaper shaper shaper
tnam Traditional Name Forms off off off yes
tnum Tabular Figures off off off yes
trad Traditional Forms off off off yes
twid Third Widths off off off yes
unic Unicase off off off yes
valt Alternate Vertical Metrics contextual contextual contextual special
vatu Vattu Variants shaper shaper shaper
vert Vertical Writing contextual contextual contextual
vhal Alternate Vertical Half Metrics off off off yes
vivn Vietnamese Forms [deprecated]

off
vjmo Vowel Jamo Forms shaper shaper shaper
vkna Vertical Kana Alternates off off contextual special
vkrn Vertical Kerning contextual contextual contextual special
vpal Proportional Alternate Vertical Metrics off off off yes
vrt2 Vertical Alternates and Rotation contextual contextual contextual special
zero Slashed Zero user user off yes
zhcn Simplified Chinese Forms [deprecated]

off
zntw Traditional Chinese Forms [deprecated]

off

Conflicts between recommendations

There are 22 features where the various specification recommendations disagree about the correct default state, not counting those instances where one or more of the documents is silent on the question.

  • altv Alternate Vertical Metrics [deprecated]
  • case Case-Sensitive Forms
  • curs Cursive Positioning
  • expt Expert Forms
  • falt Final Glyph on Line Alternates
  • fina Terminal Forms
  • hkna Horizontal Kana Alternates
  • init Initial Forms
  • isol Isolated Forms
  • ital Italics
  • jalt Justification Alternates
  • lfbd Left Bounds
  • mark Mark Positioning
  • med2 Medial Forms #2
  • medi Medial Forms
  • mset Mark Positioning via Substitution
  • pwid Proportional Widths
  • rand Randomize
  • rtbd Right Bounds
  • ssty Math Script Style Alternates
  • zero Slashed Zero

Several others Twardoch recommends off-by-default or leaving the decision up to the shaper, while Adode and Microsoft say the feature should be automatically enabled by context, since it is dependent on another feature:

  • dnom Denominators
  • dtls Dotless forms
  • numr Numerators

UI exposure

Twardoch makes a point of highlighting those features which should be accessible through the user interface; this is noted in the right-most column. Note also that he designates some features as "special" indicating that the UI access involves more than a simple toggle or checkbox.

Adobe and Microsoft also advise allowing application-wide user preferences to determine the state of seven features:

  • curs Cursive Positioning
  • expt Expert Forms
  • falt Final Glyph on Line Alternates
  • jalt Justification Alternates
  • pwid Proportional Widths
  • rand Randomize
  • zero Slashed Zero

Finally, Adobe and Microsoft advise that usage of the "Italics" feature, ital, be integrated into an application's existing UI for selecting roman/italic variants of a font. Twardoch does not mark ital as a special case.