Debian Codegraph @

notes/usage.txt

raw
1 Usage of GNU FreeFont
2
3 Language scripts and faces
4 ==========================
5
6 There are three faces (serif, sans-serif, and monospace), and four styles
7 (regular, bold, cursive/italic, and bold cursive/italic) for each face.
8 There is one font file per face/style combination: 12 files in total.
9
10 The letters for various languages, as well as specialized symbols, exist
11 among the various font files, but they are not uniformly populated.
12 All the fonts have complete support for Latin, Cyrillic, and Greek, as
13 well as most of the extensions for those scripts.
14
15 At this time, serif regular has by far the largest number of letters, and
16 supports the largest number of writing scripts. However there are writing
17 scripts supported by the sans-serif but not by serif.
18
19 For an overview of which scripts and sets of symbols are supported by
20 which face, see the GNU FreeFont 'coverage' web page.
21
22 Font features
23 =============
24
25 The fonts have numerous font "features" that perform alterations to the basic
26 letters of the font, replacing them with other letters, or positioning them
27 with respect to other letters.
28
29 Many features are activated automatically, but in some environments, they
30 present some user control. This documents those features with user control.
31 The file "features.txt" goes into more detail.
32
33 Language-specific features
34 ==========================
35
36 Some OpenType font features are activated only when the text is specified to
37 be of a certain language. For font features appropriate for a given language
38 to be activated, it is crucial that the application environment knows what
39 language the text represents (not just what writing script it is.)
40
41 This is done in HTML by enclosing the text with a tag whose 'lang' attribute
42 is set to the appropriate ISO 632.2 language code. In a word processor,
43 any block of text can be given a language setting -- for example in LibreOffice
44 Writer, for the selected text, the dialog brought up by the menu item
45 Format -> Character allows the language to be specified. In LaTeX, this
46 is done by invoking commands from special packages.
47
48 Latin
49 -----
50 Catalan ligature improving l·l
51 Dutch ligatures for ij, IJ. For the acute accent, either put combining acute
52 after each letter, or put one after the ij ligature.
53 Sami localized form for letter Eng
54 Turkish overrides ligatures fi ffi of Latin
55 Vietnamese fine positioning stacked accents. See also below.
56
57
58 Greek
59 -----
60 Greek script kappa in serif and hooked Upsilon throughout;
61 script forms of theta and rho in italic.
62 ancient Greek caps iota in ypogegrammeni form.
63 (see also character variants.)
64
65 Cyrillic
66 --------
67 Ukrainian ligature for double i-diaresis
68 South Slavic (Bosnian, Macedonian, Serbian)
69 localized form of 'be', and others in italic
70 [the 'sha' with line below is available as a character variant ]
71 Bulgarian style set for modern alternative glyphs
72
73 Hebrew
74 ------
75 Yiddish raised vowels under yo
76
77 Thai
78 ----
79 Proportional and fixed-width numerals: 'tnum', 'lnum', 'pnum'.
80
81 Devanagari
82 ----------
83 Sanskrit much larger, different set of ligatures
84 Nepali, Kokani
85 Marathi
86 Santali
87 Gujarati
88
89 'hist' feature [optional historic ligatures: for ligatures of Old Hindi]
90
91 Bengali
92 -------
93 'hlig' feature [optional ligatures with -ya]
94 'dlig' feature [optional "transparent" forms]
95
96 Gujarati
97 --------
98 Sanskrit larger and different set of ligatures
99
100 Malayalam
101 ---------
102 Both the classical and reformed scripts are supported. The default is the
103 classical script. The reformed script is enabled by specifying the
104 OpenType Style Set 'ss19'.
105
106 In LaTeX fontspec package, reformed orthography is available as
107 "Language=Malayalam Reformed". See below.
108
109 Many consonant conjunct forms that are not displayed by default are
110 available using the ZWJ character as described in the Unicode standard.
111 These extra forms are of the subscript fashion, where the subscript is one
112 of the letters
113 ka kha ga ca cha ja tta ttha dda nna ta da dha
114 na pa pha ba bha ma ra rra la va sha sa ha_mal
115 ro the ligatures
116 kaka tata
117
118 The feature "cv20" produces a post-base -ya that extends beneath preceeding
119 letter, if the letter permits it. The feature "cv21" produces alternative
120 forms of vowels i, ii, aa and au.
121
122 Indic languages
123 ---------------
124
125 The 'danda' character is encoded in Unicode only in the Devanagari range.
126 When writing in scripts of other Indic languages, this same character is to
127 be used. But the shapes and line thicknesses of glyphs vary slightly from
128 one script to another, so the same glyph for 'danda' may not fit all scripts.
129 Likewise, the spacing of Western punctuations marks is usually wider in
130 Indic typography.
131
132 By specifying the language of the text, an appropriate glyph for 'danda'
133 may be obtained, and Western punctuation may be better spaced.
134
135 Likewise, a space mark of appropriate width, as well as better punctuation
136 marks, may be obtained by specifying the language of the text.
137
138 Fixed-width numerals are available in all the Indic scripts, via the 'tnum'
139 or 'lnum' features. Proportional-width numerals are enforced with 'pnum'.
140
141 Vedic marks
142 -----------
143
144 Systems of marks used to annotate the text of the Vedas have been used
145 in Indic scripts. Many of the Vedic marks defined by Unicode are
146 implemented for Devanagari, and some in other scripts as well (Oriya).
147
148 Style sets
149 ==========
150
151 These replacements are meant to indicate variant typgraphic style, and
152 are activated by enabling a "Style Set" in the document.
153
154 Greek Extended Adscript iota on capitals (ss06)
155
156 Cyrillic Bulgarian modern (ss01)
157
158 Devanagari Bombay (ss02), Calcutta (ss03), Nepali (ss04)
159
160 Tamil Reformed orthography (ss07)
161
162 Georgian Mtavruli versions of Mkhedruli letters (ss08)
163
164 Latin Calligraphic Latin letters (ss11)
165 (serif normal) Fraktur Latin letters (ss12)
166 Script Latin letters (ss14)
167 Blackboard-Bold Latin letters and digits (ss15)
168 Insular letters (ss13)
169
170 bold face Latin characters have a boldface versions (ss16)
171 (serif normal) This currenly operates only on Latin letters, and on script,
172 fraktur, and calligraphic forms of those letters.
173
174 Character variants
175 ==================
176 These are uaually a replacement for a single letter with another.
177
178 Latin:
179 script alpha for languages of Cameroon (cv01)
180 insular forms for certain letters for Old English, Welsh (cv02)
181
182 Greek: (Some of these are done already by the default 'locl' feature,
183 and are useful only when that feature is disabled);
184 script kappa (cv01);
185 script beta except initial and isolated forms (cv02);
186 script theta initial (cv03); script theta throughout (cv04);
187 sigma lunate (cv05)
188 final sigma lunate (cv06)
189 small cap ypogrammeni iota (cv07)
190
191 Cyrillic: in italic faces, Serbian/Macedonian underscored 'sha' (cv01)
192
193 Tamil: form of 'ra' invariant with vowel marks (cv01).
194
195 Discretionary features
196 ======================
197 These features are accessible only from typesetting software.
198 Typically the user must specifically request them.
199
200 Unless otherwise noted, these are available only in FreeSerif.
201
202 Ligatures and substitutions
203 ---------------------------
204
205 Arabic, Armenian, Hebrew, German, Dutch, Spanish
206 Bengali (in Sans)
207 Oriya
208
209 Stacked accents
210 ---------------
211
212 In the Latin ranges, there are a number of characters with one accent
213 upon another. These cause typographical difficulties.
214
215 Especially in the Vietnamese range, for some purposes it is best for these
216 accents to stand high above the letter, but for others, it is best that
217 they remain within the line bounds.
218
219 By default, the accents stand high, exceeding vertical line bounds,
220 although this may cause clipping and refresh issues in some applications.
221 A second set of glyphs, with "flattened" accents that keep inside the
222 vertical line bounds, may be had by enabling the 'flac' feature.
223
224 Small captials
225 --------------
226
227 A limited set of specially drawn small capital letters in Latin, Greek and
228 Cyrillic, enabled by the font feature settings 'smcp' and 'c2sc' or by CSS
229 font-variant-caps: small-caps;
230 font-variant-caps: all-small-caps;
231
232 Superscript and subscript
233 -------------------------
234
235 Transform a limited set of characters--mostly Latin letters and numerals--
236 to versions well-sized and positioned as superscript or subscript. Enabled
237 by the font feature settings 'subs', 'sups', or by CSS
238 font-variant-position: sub;
239 font-variant-position: sup;
240
241 Numeral styles
242 --------------
243
244 The default numerals of FreeSerif are mono-spaced and of even height.
245 It also features proportionally-spaced numerals, and "old-style" numerals--
246 those which vary in height and sometimes go beneath the baseline. Controlled
247 by font feature settings 'pnum', 'onum', 'tnum', 'lnum', or by CSS property
248 font-variant-numeric
249 with values
250 oldstyle-nums, proportional-nums, tabular-nums, lining-nums.
251
252 Fraction styles
253 ------------------
254
255 A limited set of diagonal fraction substitutions are available at discretion.
256 The set is more than what is encoded in Unicode.
257 They work with the ASCII slash or the mathematical slash U+2215
258 to transform a sequence "number-slash-number" to a diagonal form.
259
260 These are enabled wih the font feature setting of 'frac'
261 or CSS
262 font-variant-numeric: diagonal-fractions;
263
264 More general stacked fractions are available with the font feature setting
265 'afrc' or with CSS
266 font-variant-numeric: stacked-fractions;
267
268 Zero
269 ----
270
271 A slashed form of the numeral zero is available at discretion.
272 Available in all faces with font feature setting 'zero' or with CSS
273 font-variant-numeric: slashed-zero;
274
275 Underlines and Overlines
276 ------------------------
277
278 In Latin, Cyrillic, and Coptic, overlines and underlines have been used to
279 convey information. Variable-width overlines and underlines for many letters
280 may be produced by inserting U+0305 (combining overline), U+0332 (combining
281 lowline), or in a different style with U+FE26 (combining conjoining macron),
282 U+FE2D (combining conjoining macron below) directly after each letter.
283
284 Alternative characters
285 ======================
286
287 FreeSerif has some listings of alternatives for specific characters.
288 Again these are used primarily by specialized typesetting software.
289
290 Greek, Latin
291
292 This face also has also a listing of ornamental versions of punctuation
293 marks such as bullets and stars (ornm).
294
295 Use in HTML with CSS
296 ====================
297 Most web browsers have lately become very typography-savvy, having long
298 outstripped word processors in this regard.
299
300 In basic HTML, it is most important to properly specify the langugage of
301 each text element, using HTML 'lang' attributes. Many typographic
302 features of the font will be activated only for certain languages.
303
304 If the whole document is in English, for example, the attribute
305 lang="en-US"
306 in the <html> element will suffice. Any sub-element can be given a
307 separate language when needed.
308
309 With CSS, the "font-family" property can be specified as one of
310 'freeserif', 'freesans' or 'freemono',
311 and several other properties influencing typographic presentation can
312 also be set: "font-weight", "font-style", etc.
313 The standards documents are at
314 https://www.w3.org/TR/css-fonts-3/
315 In CSS 3, a special property 'font-feature-settings' that gives explicit
316 control of OpenType font features was introduced.
317 https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings
318 It is usually more appropriate to use explicit CSS 'font-variant' properties
319 to reach these features.
320
321 These explicit features are specific to particular fonts. So this
322 technology is meant to work with "web fonts", a means of delivering
323 a font with your web page. See the document "webfont_guidelines.txt"
324 for more information about this.
325
326 A new propperty is slated to come with CSS4: font-language-override.
327 This should permit the font's language tags to be accessed directly.
328 However, as of this writing, few browsers have implemented it.
329
330
331 Use in LaTeX
332 ============
333 It is possible to use Unicode fonts in recent LaTeX implementations, but in
334 LuaTeX http://www.luatex.org/ and
335 XeTeX http://tug.org/xetex/
336 it is particularly easy to use Unicode text, and to enable font features.
337 Recent versions of these systems use the 'fontspec' package to choose fonts
338 and features.
339
340 LuaTeX note: for lualatex to search the local font directory ~/.fonts/f,
341 the OSFONTDIR variable may be set, either in the luatex config files
342 or as an environment variable, e.g.
343 export OSFONTDIR=/home/swhite/.fonts/f//
344
345 A LaTeX (.tex) document in these implementations might contain the lines:
346 ---------------------------------------------------------------------------
347 \documentclass{ltxdockit}
348 \usepackage{fontspec}
349 \setmainfont[]{FreeSerif}
350
351 \newfontfamily{\altbg}[Script=Cyrillic,Language=Bulgarian,
352 Variant={1}]{FreeSerif}
353 \newfontfamily{\altsb}[Script=Cyrillic,Language=Serbian,
354 ItalicFeatures={Script=Cyrillic, Language=Serbian, Style=Alternate},
355 BoldItalicFeatures={Script=Cyrillic, Language=Serbian, Style=Alternate} ]
356 {FreeSerif}
357
358 \begin{document}
359 {\fontspec[Script=Default,Fractions={On}]{FreeSerif}
360 1/7 3/10 7/10}
361
362 x\raisebox{-0.5ex}{{\scriptsize ai}}
363 x{\fontspec[Script=Default,VerticalPosition={Inferior}]{FreeSerif}
364 abcdefghijklmnopqrstuvwxyz+−(0123456789)} \\
365 x\raisebox{0.85ex}{{\scriptsize ai}}
366 x{\fontspec[Script=Default,VerticalPosition={Superior}]{FreeSerif}
367 abcdefghijklmnopqrstuvwxyz+−(0123456789)}
368
369 {\fontspec[Script=Latin]{FreeSerif}
370 \textsc{Small Caps} }
371
372 { Bсички хора се раждат свободни и равни по достойнство и права.
373
374 \altbg
375 Bсички хора се раждат свободни и равни по достойнство и права. }
376
377 \altsb{
378 Oнa су oбдaрeнa рaзумoм и свeшћу и трeбajeдни прeмa другимa дa пoступajу у духу брaтствa.
379
380 \textit{
381 Oнa су oбдaрeнa рaзумoм и свeшћу и трeбajeдни прeмa другимa дa пoступajу у духу брaтствa.
382 }
383 }
384
385 \end{document}
386 ---------------------------------------------------------------------------
387 LaTeX package 'fontspec' setting-value pairs meaningful for FreeFont.
388
389 Numbers: Lining OldStyle Proportional SlashedZero
390 Fractions: On
391 VerticalPosition: Superior Inferior
392 Ligatures: Common Historical
393 Letters: UppercaseSmallCaps
394 Style: Alternate Historic
395 Variant: 1 (etc. -- must be in {}, picks style set.)
396 ---------------------------------------------------------------------------
397 LaTeX package 'unicode-math' provides very good access to math characters and
398 features in FreeSerif and FreeSans.
399
400 \usepackage{unicode-math}
401 \setmathfont[Extension = .otf]{FreeSerif}
402 \setmainfont[Extension = .otf]{FreeSerif}
403 % The further commands enable the math font selection commands
404 \setmathfont[Extension = .otf,bold-style=TeX]{FreeSerif}
405 \setmathfont[Extension = .otf,range=\mathbfup/{greek,Greek,Numerals}]{FreeSerif}
406 \setmathfont[Extension = .otf,range={\mathscr,\mathbfscr,\mathfrak,\mathbb,\mathbffrak}]{FreeSerif}
407 % Finally, calligraphic letters are accessed by Style Selector:
408 \newfontfamily\texmathcal[Extension = .otf,Script=Latin,Variant={10}]{FreeSerif}
409 \renewcommand{\mathcal}[1]{\mbox{\texmathcal\selectfont #1}}
410 \newfontfamily\texmathbfcal[Extension = .otf,Script=Latin,Variant={11}]{FreeSerif}
411 \renewcommand{\mathbfcal}[1]{\mbox{\texmathbfcal\selectfont #1}}
412 ---------------------------------------------------------------------------
413 Some character ranges do not have 'italic' or 'oblique' versions.
414
415 To produce slanted text in such ranges, 'fontspec' has features FakeSlant
416 and AutoFakeSlant.
417 ---------------------------------------------------------------------------
418
419 Use with unicode-math TeX package
420 =================================
421
422 FreeSerif and FreeSans have some support for the TeX package unicode-math
423 package (or any other software that uses the OpenType MATH tables).
424 By this means, math formulas may be displayed using the fonts.
425
426 FreeSerif further includes the Unicode Mathematical Alphanumeric Symbols
427 range in its Roman face, so that it is possible to typeset a whole math
428 document using only FreeSerif-normal.
429
430 In XeTeX and LuaTeX, the primary commands are
431 \usepackage{fontspec}
432 \usepackage{unicode-math}
433
434 XeTeX is aware of the locations of system fonts:
435 \setmainfont[]{FreeSerif}
436 \setmathfont[]{FreeSerif}
437 In LuaTeX, the paths must be explicitly stated, for example:
438 \setmainfont[Path=FONT-DIR-FULL-PATH] {FreeSerif}
439
440 It is possible to either use FreeSerif italic for the main math symbols font
441 \setmathfont[Path=FONT-DIR-FULL-PATH, range=\mathit] {FreeSerifItalic}
442 or else to use the built-in math alphanumeric symbols ranges
443 \setmathfont[Path=FONT-DIR-FULL-PATH, range=\mathit] {FreeSerif}
444 Other ranges are listed in the unicode-math.
445
446 Use with MATHML
447 ===============
448
449 FreeSerif and FreeSans function, with some limitations, with MATHML.
450
451 Mozilla Firefox supports MATHML. To use it with GNU FreeFont, it is
452 necessary to specify FreeSerif or FreeSans in the 'about:config' setting
453 'font.name-list.serif.x-math'. Note that the first font found in the list
454 is the one used for math.
455
456 Limitations include:
457 1) vertical extension of symbols such as the integral
458 and brackets begins when font height is reached---whereas in many math
459 fonts, very high precomposed symbols are used.
460 2) The height of the summation and some other variable sized symbols is
461 limited to font height.
462 3) A few extensible arrows don't extend correctly, although others do.
463 What triggers this is unknown.
464
465 Use with LibreOffice
466 ====================
467
468 Font features can be turned on in LibreOffice Writer by an arcane trick.
469 In the little text box for the font name, append the desired feature setting
470 to the name of the font, with a colon (:) separating the font name from the
471 feature setting. Typeing in this box
472 FreeSerif:ss19=1
473 will turn Style Set 19 on.
474
475 (We can hope this will be made more user-friendly in the future.)
476
477 $Id: usage.txt 4134 2020-03-22 14:22:02Z Stevan_White $