| 1 |
OpenType features in GNU FreeFont |
| 2 |
|
| 3 |
The OpenType font standard specifies numerous "features", which describe |
| 4 |
how glyphs should be rendered under certain circumstances. |
| 5 |
|
| 6 |
Some features, such as ligatures, substitute one glyph (or glyphs) with |
| 7 |
others. Other features such as kerning adjust the positioning of glyphs. |
| 8 |
|
| 9 |
A feature may be activated for text of a certain script (such as Cyrillic |
| 10 |
or Arabic) in a certain language or region (as can be specified in HTML |
| 11 |
elements with the "lang" attribute), and some are activated only in case |
| 12 |
other features are not activated. |
| 13 |
|
| 14 |
The actual rendering of these features is not by the font itself but rather |
| 15 |
by font rendering software in the operating system or application or printer. |
| 16 |
As of this writing, feature support is far from perfect in many environments. |
| 17 |
|
| 18 |
The features are encoded in the font's "lookup tables". Each table has |
| 19 |
a four-byte name. |
| 20 |
|
| 21 |
The feature lookup tables used in FreeFont include: |
| 22 |
|
| 23 |
Substitution (GSUB) |
| 24 |
============ |
| 25 |
Some features are usually enabled, and not intended for user interaction. |
| 26 |
Others are usually disabled, and only turned on by some direction in the |
| 27 |
document. A few provide an "alternatives list", to allow picking of |
| 28 |
glyph alternates for a certain character from a list--just how this is |
| 29 |
done depends on the application. |
| 30 |
|
| 31 |
rlig required ligature |
| 32 |
liga standard ligature |
| 33 |
hlig historic ligature |
| 34 |
dlig discretionary ligature |
| 35 |
|
| 36 |
hist historic form |
| 37 |
locl localized form |
| 38 |
|
| 39 |
smcp lowercase to small capitals |
| 40 |
c2sc captials to small capitals |
| 41 |
|
| 42 |
frac diagonal fractions (up to 9 decimals with slash / or fraction u+2044) |
| 43 |
afrc stacked fractions (with slash /) |
| 44 |
zero slashed zero |
| 45 |
lnum lining figures |
| 46 |
onum oldstyle figures |
| 47 |
pnum proportional-width figures |
| 48 |
tnum tablular figures |
| 49 |
ordn ordinal indicators (Latin-based and English) |
| 50 |
|
| 51 |
ccmp glyph decomposition (multiple replacement) |
| 52 |
contextual chained substitution |
| 53 |
|
| 54 |
aalt access all alternates |
| 55 |
calt contextual alternates |
| 56 |
salt stylistic alternate |
| 57 |
|
| 58 |
Arabic |
| 59 |
------ |
| 60 |
init initial forms |
| 61 |
medi medial forms |
| 62 |
fina final formes |
| 63 |
|
| 64 |
Thai |
| 65 |
------------- |
| 66 |
lnum lining figures |
| 67 |
pnum proportional-width figures |
| 68 |
tnum tablular figures |
| 69 |
|
| 70 |
Indic scripts |
| 71 |
------------- |
| 72 |
(these are always applied in exactly the following order) |
| 73 |
nukt nukta forms |
| 74 |
akhn akhand |
| 75 |
pref pre-base form |
| 76 |
rphf reph form |
| 77 |
blwf below base forms |
| 78 |
half half form |
| 79 |
vatu vattu variants |
| 80 |
pres pre-base substitutions |
| 81 |
abvs above base substitutions |
| 82 |
blws below base substitutions |
| 83 |
psts post base substitutions |
| 84 |
haln halant forms |
| 85 |
|
| 86 |
lnum lining figures |
| 87 |
pnum proportional-width figures |
| 88 |
tnum tablular figures |
| 89 |
|
| 90 |
Character Variants |
| 91 |
========== |
| 92 |
cv01 Latin Alpha for Cameroon languages |
| 93 |
cv02 Insular forms of Latin letters for Old English, Welsh |
| 94 |
cv20 swept -ya in Malayalam |
| 95 |
cv21 alternative vowels in Malayalam |
| 96 |
|
| 97 |
Style Sets |
| 98 |
========== |
| 99 |
ss01 Bulgarian Cyrillic Alternate |
| 100 |
ss02 Devanagari Bombay |
| 101 |
ss03 Devanagari Calcutta |
| 102 |
ss04 Devanagari Nepali |
| 103 |
ss06 Greek iota adscript on capitals |
| 104 |
ss07 Tamil Reformed |
| 105 |
ss08 Georgian Mtavruli |
| 106 |
ss10 bold forms (latin only) |
| 107 |
ss11 Latin Calligraphic (TeX \mathcal) |
| 108 |
ss12 Fraktur |
| 109 |
ss13 Latin Script |
| 110 |
ss14 Latin Blackboard-Bold |
| 111 |
ss19 Malayalam Reformed |
| 112 |
|
| 113 |
Positioning (GPOS) |
| 114 |
=========== |
| 115 |
|
| 116 |
kern kerning |
| 117 |
mark mark-to-base |
| 118 |
mkmk mark-to-mark |
| 119 |
|
| 120 |
Indic scripts |
| 121 |
------------- |
| 122 |
dist distance (similar to kern) |
| 123 |
abvm above mark (similar to mark) |
| 124 |
blwm below mark (similar to mark) |
| 125 |
|
| 126 |
Variation Selectors |
| 127 |
------------------- |
| 128 |
On systems that support Unicode Variation Selectors, alternate forms of math |
| 129 |
symbols, as listed in the Unicode document "Standardized Variants", are |
| 130 |
available by following the symbol with the variation selector character U+FE00. |
| 131 |
(While this isn't in itself strictly a font feature, it is implemented |
| 132 |
with a font feature.) |
| 133 |
|
| 134 |
Use of features |
| 135 |
=============== |
| 136 |
|
| 137 |
Just how a feature is to be enabled varies greatly from one application |
| 138 |
to another, as does the set of features that is supported. Recently there |
| 139 |
is a lot of interest in typographic features, and things are changing fast. |
| 140 |
|
| 141 |
Many older programs have very poor support for OpenType features. |
| 142 |
|
| 143 |
Word processors have had surprisingly poor support. |
| 144 |
For some time, there has been a manual switch for kerning, and a few |
| 145 |
other features might work, but most are non-functional. |
| 146 |
In recent years, a method for activating font features has been added to |
| 147 |
LibreOffice. See the USAGE file. |
| 148 |
|
| 149 |
The basic font support in modern operating systems is good. |
| 150 |
The effect is, often a text editor makes better use of font features |
| 151 |
than a word processor does. |
| 152 |
|
| 153 |
Most "page layout" desktop publishing programs have fair support for |
| 154 |
many OpenType features. There are tables available on the Web |
| 155 |
|
| 156 |
Modern LaTeX typesetting programs, such as XeTeX and LuaTeX, have very |
| 157 |
good support via packages such as 'fontspec'. |
| 158 |
|
| 159 |
Web browsers have generally adopted the CSS 3 'font-feature-settings' |
| 160 |
property to directly request font features, as well as several 'font-variant' |
| 161 |
properties that do the same thing. |
| 162 |
|
| 163 |
Note that it is necessary to correctly indicate the language of each text |
| 164 |
element of HTML, using 'lang' attributes, in order for features to be |
| 165 |
properly activated. |
| 166 |
See https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings |
| 167 |
|
| 168 |
Policies |
| 169 |
======== |
| 170 |
|
| 171 |
kerning |
| 172 |
------- |
| 173 |
|
| 174 |
Kerning consists of a delicate adjustment of horizontal positioning of |
| 175 |
letters based on the relative shapes of adjacent letters. |
| 176 |
|
| 177 |
The first goal of kerning is to enhance the appearance of coherence in |
| 178 |
words, by reducing apparent spaces beteen adjacent letters. |
| 179 |
The second is to make the spacing appear somehow "smooth". |
| 180 |
|
| 181 |
A few pairs of letters are strongly kerned, for example 'AV'. With very few |
| 182 |
exceptions, one letter should not visually intrude on the horizontal space of |
| 183 |
another. (Exceptions might include the hooks on 'f' and 'j'.) |
| 184 |
For instance, in serifed fonts, the serifs of most letters should have a |
| 185 |
visible space between them, and should not visually intrude on one another |
| 186 |
horizontally. |
| 187 |
|
| 188 |
For most others, the policy is "err on the conservative side". |
| 189 |
A common mistake is to try to minimize the area between the letters |
| 190 |
-- with poor effect on text appearance. |
| 191 |
|
| 192 |
After kerning, bulk text should be carefully inspected both in print and on |
| 193 |
the screen in different resolutions, that the letters appear evenly-spaced, |
| 194 |
and never crash into one another. |
| 195 |
|
| 196 |
mark positioning |
| 197 |
---------------- |
| 198 |
Positioning features are not directly accessible to users. |
| 199 |
|
| 200 |
It is conceptually more direct, and in principle easier, to position marks |
| 201 |
relative to letters using the various mark positioning lookups, rather |
| 202 |
than to provide separate glyphs for each combination. |
| 203 |
|
| 204 |
GNU FreeFont makes especially heavy use of positioning of marks in Indic |
| 205 |
scripts, in which both vowels and consonants may be positioned above or |
| 206 |
below a base letter. |
| 207 |
|
| 208 |
Especially in cases where multiple marks appear on the same base, it can |
| 209 |
get just too messy to be practical. Unfortunately, pre-composed |
| 210 |
components are often a necessary fallback. |
| 211 |
|
| 212 |
$Id: features.txt 4133 2020-03-22 13:05:30Z Stevan_White $ |