	Usage of GNU FreeFont

Language scripts and faces
==========================

There are three faces (serif, sans-serif, and monospace), and four styles
(regular, bold, cursive/italic, and bold cursive/italic) for each face.
There is one font file per face/style combination: 12 files in total.

The letters for various languages, as well as specialized symbols, exist
among the various font files, but they are not uniformly populated.
All the fonts have complete support for Latin, Cyrillic, and Greek, as
well as most of the extensions for those scripts.

At this time, serif regular has by far the largest number of letters, and
supports the largest number of writing scripts.  However there are writing
scripts supported by the sans-serif but not by serif.

For an overview of which scripts and sets of symbols are supported by
which face, see the GNU FreeFont 'coverage' web page.

Font features
=============

The fonts have numerous font "features" that perform alterations to the basic
letters of the font, replacing them with other letters, or positioning them
with respect to other letters.

Many features are activated automatically, but in some environments, they
present some user control.  This documents those features with user control.
The file "features.txt" goes into more detail.

Language-specific features
==========================

Some OpenType font features are activated only when the text is specified to
be of a certain language.  For font features appropriate for a given language
to be activated, it is crucial that the application environment knows what
language the text represents (not just what writing script it is.)

This is done in HTML by enclosing the text with a tag whose 'lang' attribute
is set to the appropriate ISO 632.2 language code.  In a word processor, 
any block of text can be given a language setting -- for example in LibreOffice
Writer, for the selected text, the dialog brought up by the menu item 
Format -> Character allows the language to be specified.  In LaTeX, this
is done by invoking commands from special packages.

Latin
-----
Catalan	ligature improving l·l
Dutch	ligatures for ij, IJ.  For the acute accent, either put combining acute
	after each letter, or put one after the ij ligature.
Sami	localized form for letter Eng
Turkish	overrides ligatures fi ffi of Latin
Vietnamese	fine positioning stacked accents.  See also below.


Greek
-----
Greek	script kappa in serif and hooked Upsilon throughout;
	script forms of theta and rho in italic.
	ancient Greek caps iota in ypogegrammeni form.
	(see also character variants.)

Cyrillic
--------
Ukrainian	ligature for double i-diaresis
South Slavic	(Bosnian, Macedonian, Serbian)
	localized form of 'be', and others in italic
	[the 'sha' with line below is available as a character variant ]
Bulgarian	style set for modern alternative glyphs

Hebrew
------
Yiddish	raised vowels under yo

Thai
----
Proportional and fixed-width numerals: 'tnum', 'lnum', 'pnum'.

Devanagari
----------
Sanskrit	much larger, different set of ligatures
Nepali, Kokani
Marathi
Santali
Gujarati

'hist' feature	 [optional historic ligatures: for ligatures of Old Hindi]

Bengali
-------
'hlig' feature	 [optional ligatures with -ya]
'dlig' feature	 [optional "transparent" forms]

Gujarati
--------
Sanskrit	larger and different set of ligatures

Malayalam
---------
Both the classical and reformed scripts are supported.  The default is the
classical script.  The reformed script is enabled by specifying the
OpenType Style Set 'ss19'.

In LaTeX fontspec package, reformed orthography is available as 
"Language=Malayalam Reformed".  See below.

Many consonant conjunct forms that are not displayed by default are 
available using the ZWJ character as described in the Unicode standard.
These extra forms are of the subscript fashion, where the subscript is one
of the letters 
	ka kha ga ca cha ja tta ttha dda nna ta da dha
	na pa pha ba bha ma ra rra la va sha sa ha_mal
ro the ligatures
	kaka tata 

The feature "cv20" produces a post-base -ya that extends beneath preceeding 
letter, if the letter permits it.  The feature "cv21" produces alternative
forms of vowels i, ii, aa and au.

Indic languages
---------------

The 'danda' character is encoded in Unicode only in the Devanagari range.
When writing in scripts of other Indic languages, this same character is to
be used.  But the shapes and line thicknesses of glyphs vary slightly from
one script to another, so the same glyph for 'danda' may not fit all scripts.
Likewise, the spacing of Western punctuations marks is usually wider in 
Indic typography.

By specifying the language of the text, an appropriate glyph for 'danda'
may be obtained, and Western punctuation may be better spaced.

Likewise, a space mark of appropriate width, as well as better punctuation
marks, may be obtained by specifying the language of the text.

Fixed-width numerals are available in all the Indic scripts, via the 'tnum'
or 'lnum' features.  Proportional-width numerals are enforced with 'pnum'.

Vedic marks
-----------

Systems of marks used to annotate the text of the Vedas have been used 
in Indic scripts.  Many of the Vedic marks defined by Unicode are 
implemented for Devanagari, and some in other scripts as well (Oriya).

Style sets
==========

These replacements are meant to indicate variant typgraphic style, and
are activated by enabling a "Style Set" in the document.

Greek Extended  Adscript iota on capitals (ss06)

Cyrillic        Bulgarian modern (ss01)

Devanagari      Bombay (ss02), Calcutta (ss03), Nepali (ss04)

Tamil           Reformed orthography (ss07)

Georgian        Mtavruli versions of Mkhedruli letters (ss08)

Latin           Calligraphic Latin letters (ss11)
(serif normal)  Fraktur Latin letters (ss12)
                Script Latin letters (ss14)
                Blackboard-Bold Latin letters and digits (ss15)
                Insular letters (ss13)

bold face       Latin characters have a boldface versions (ss16)
(serif normal)  This currenly operates only on Latin letters, and on script,
                fraktur, and calligraphic forms of those letters.

Character variants
==================
These are uaually a replacement for a single letter with another.

Latin:
	script alpha for languages of Cameroon (cv01)
	insular forms for certain letters for Old English, Welsh (cv02)

Greek: (Some of these are done already by the default 'locl' feature,
	and are useful only when that feature is disabled);
	script kappa (cv01);
	script beta except initial and isolated forms (cv02);
	script theta initial (cv03); script theta throughout (cv04);
	sigma lunate (cv05)
	final sigma lunate (cv06)
	small cap ypogrammeni iota (cv07)

Cyrillic: in italic faces, Serbian/Macedonian underscored 'sha' (cv01)

Tamil: form of 'ra' invariant with vowel marks (cv01).

Discretionary features
======================
These features are accessible only from typesetting software.
Typically the user must specifically request them.

Unless otherwise noted, these are available only in FreeSerif.

Ligatures and substitutions
---------------------------

Arabic, Armenian, Hebrew, German, Dutch, Spanish
Bengali (in Sans)
Oriya

Stacked accents
---------------

In the Latin ranges, there are a number of characters with one accent
upon another.  These cause typographical difficulties.

Especially in the Vietnamese range, for some purposes it is best for these
accents to stand high above the letter, but for others, it is best that 
they remain within the line bounds.

By default, the accents stand high, exceeding vertical line bounds,
although this may cause clipping and refresh issues in some applications. 
A second set of glyphs, with "flattened" accents that keep inside the
vertical line bounds, may be had by enabling the 'flac' feature.

Small captials
--------------

A limited set of specially drawn small capital letters in Latin, Greek and
Cyrillic,  enabled by the font feature settings 'smcp' and 'c2sc' or by CSS
	font-variant-caps: small-caps;
	font-variant-caps: all-small-caps;

Superscript and subscript
-------------------------

Transform a limited set of characters--mostly Latin letters and numerals--
to versions well-sized and positioned as superscript or subscript.  Enabled
by the font feature settings 'subs', 'sups', or by CSS
	font-variant-position: sub;
	font-variant-position: sup;

Numeral styles
--------------

The default numerals of FreeSerif are mono-spaced and of even height.
It also features proportionally-spaced numerals, and "old-style" numerals--
those which vary in height and sometimes go beneath the baseline.  Controlled
by font feature settings 'pnum', 'onum', 'tnum', 'lnum', or by CSS property
	font-variant-numeric
with values
	oldstyle-nums, proportional-nums, tabular-nums, lining-nums.

Fraction styles
------------------

A limited set of diagonal fraction substitutions are available at discretion.
The set is more than what is encoded in Unicode.
They work with the ASCII slash or the mathematical slash U+2215
to transform a sequence "number-slash-number" to a diagonal form.

These are enabled wih the font feature setting of 'frac'
or CSS
	font-variant-numeric: diagonal-fractions;

More general stacked fractions are available with the font feature setting 
'afrc' or with CSS
	font-variant-numeric: stacked-fractions;

Zero
----

A slashed form of the numeral zero is available at discretion.
Available in all faces with font feature setting 'zero' or with CSS
	font-variant-numeric: slashed-zero;

Underlines and Overlines
------------------------

In Latin, Cyrillic, and Coptic, overlines and underlines have been used to
convey information.  Variable-width overlines and underlines for many letters
may be produced by inserting U+0305 (combining overline), U+0332 (combining
lowline), or in a different style with U+FE26 (combining conjoining macron),
U+FE2D (combining conjoining macron below) directly after each letter.

Alternative characters
======================

FreeSerif has some listings of alternatives for specific characters.
Again these are used primarily by specialized typesetting software.

	Greek, Latin

This face also has also a listing of ornamental versions of punctuation 
marks such as bullets and stars (ornm).

Use in HTML with CSS
====================
Most web browsers have lately become very typography-savvy, having long
outstripped word processors in this regard. 

In basic HTML, it is most important to properly specify the langugage of
each text element, using HTML 'lang' attributes.  Many typographic
features of the font will be activated only for certain languages.

If the whole document is in English, for example, the attribute 
	lang="en-US"
in the <html> element will suffice.  Any sub-element can be given a 
separate language when needed.

With CSS, the "font-family" property can be specified as one of
	'freeserif', 'freesans' or 'freemono',
and several other properties influencing typographic presentation can
also be set: "font-weight", "font-style", etc.
The standards documents are at
	https://www.w3.org/TR/css-fonts-3/
In CSS 3, a special property 'font-feature-settings' that gives explicit
control of OpenType font features was introduced. 
	https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings
It is usually more appropriate to use explicit CSS 'font-variant' properties
to reach these features.

These explicit features are specific to particular fonts.  So this 
technology is meant to work with "web fonts", a means of delivering
a font with your web page.  See the document "webfont_guidelines.txt"
for more information about this.

A new propperty is slated to come with CSS4: font-language-override.
This should permit the font's language tags to be accessed directly.
However, as of this writing, few browsers have implemented it.


Use in LaTeX
============
It is possible to use Unicode fonts in recent LaTeX implementations, but in
	LuaTeX http://www.luatex.org/ and
	XeTeX http://tug.org/xetex/
it is particularly easy to use Unicode text, and to enable font features.
Recent versions of these systems use the 'fontspec' package to choose fonts
and features.

LuaTeX note: for lualatex to search the local font directory ~/.fonts/f,
the OSFONTDIR variable may be set, either in the luatex config files
or as an environment variable, e.g.
	export OSFONTDIR=/home/swhite/.fonts/f//

A LaTeX (.tex) document in these implementations might contain the lines:
---------------------------------------------------------------------------
\documentclass{ltxdockit}
\usepackage{fontspec}
\setmainfont[]{FreeSerif}

\newfontfamily{\altbg}[Script=Cyrillic,Language=Bulgarian,
Variant={1}]{FreeSerif}
\newfontfamily{\altsb}[Script=Cyrillic,Language=Serbian,
ItalicFeatures={Script=Cyrillic, Language=Serbian, Style=Alternate},
BoldItalicFeatures={Script=Cyrillic, Language=Serbian, Style=Alternate} ]
{FreeSerif}

\begin{document}
{\fontspec[Script=Default,Fractions={On}]{FreeSerif}
1/7 3/10 7/10}

x\raisebox{-0.5ex}{{\scriptsize ai}}
x{\fontspec[Script=Default,VerticalPosition={Inferior}]{FreeSerif}
abcdefghijklmnopqrstuvwxyz+−(0123456789)} \\
x\raisebox{0.85ex}{{\scriptsize ai}}
x{\fontspec[Script=Default,VerticalPosition={Superior}]{FreeSerif}
abcdefghijklmnopqrstuvwxyz+−(0123456789)}

{\fontspec[Script=Latin]{FreeSerif}
\textsc{Small Caps} }

{ Bсички хора се раждат свободни и равни по достойнство и права.

\altbg
Bсички хора се раждат свободни и равни по достойнство и права.  }

\altsb{
Oнa су oбдaрeнa рaзумoм и свeшћу и трeбajeдни прeмa другимa дa пoступajу у духу брaтствa. 

\textit{
Oнa су oбдaрeнa рaзумoм и свeшћу и трeбajeдни прeмa другимa дa пoступajу у духу брaтствa. 
}
}

\end{document}
---------------------------------------------------------------------------
LaTeX package 'fontspec' setting-value pairs meaningful for FreeFont.

Numbers: Lining OldStyle Proportional SlashedZero
Fractions: On
VerticalPosition: Superior Inferior
Ligatures: Common Historical
Letters: UppercaseSmallCaps
Style: Alternate Historic
Variant: 1 (etc. -- must be in {}, picks style set.)
---------------------------------------------------------------------------
LaTeX package 'unicode-math' provides very good access to math characters and
features in FreeSerif and FreeSans.

\usepackage{unicode-math}
\setmathfont[Extension = .otf]{FreeSerif}
\setmainfont[Extension = .otf]{FreeSerif}
% The further commands enable the math font selection commands
\setmathfont[Extension = .otf,bold-style=TeX]{FreeSerif}
\setmathfont[Extension = .otf,range=\mathbfup/{greek,Greek,Numerals}]{FreeSerif}
\setmathfont[Extension = .otf,range={\mathscr,\mathbfscr,\mathfrak,\mathbb,\mathbffrak}]{FreeSerif}
% Finally, calligraphic letters are accessed by Style Selector:
\newfontfamily\texmathcal[Extension = .otf,Script=Latin,Variant={10}]{FreeSerif}
\renewcommand{\mathcal}[1]{\mbox{\texmathcal\selectfont #1}}
\newfontfamily\texmathbfcal[Extension = .otf,Script=Latin,Variant={11}]{FreeSerif}
\renewcommand{\mathbfcal}[1]{\mbox{\texmathbfcal\selectfont #1}}
---------------------------------------------------------------------------
Some character ranges do not have 'italic' or 'oblique' versions.

To produce slanted text in such ranges, 'fontspec' has features FakeSlant
and AutoFakeSlant.
---------------------------------------------------------------------------

Use with unicode-math TeX package
=================================

FreeSerif and FreeSans have some support for the TeX package unicode-math
package (or any other software that uses the OpenType MATH tables).
By this means, math formulas may be displayed using the fonts.

FreeSerif further includes the Unicode Mathematical Alphanumeric Symbols
range in its Roman face, so that it is possible to typeset a whole math
document using only FreeSerif-normal.

In XeTeX and LuaTeX, the primary commands are
	\usepackage{fontspec}
	\usepackage{unicode-math}

XeTeX is aware of the locations of system fonts:
	\setmainfont[]{FreeSerif}
	\setmathfont[]{FreeSerif}
In LuaTeX, the paths must be explicitly stated, for example:
	\setmainfont[Path=FONT-DIR-FULL-PATH] {FreeSerif}

It is possible to either use FreeSerif italic for the main math symbols font
	\setmathfont[Path=FONT-DIR-FULL-PATH, range=\mathit] {FreeSerifItalic}
or else to use the built-in math alphanumeric symbols ranges
	\setmathfont[Path=FONT-DIR-FULL-PATH, range=\mathit] {FreeSerif}
Other ranges are listed in the unicode-math.

Use with MATHML
===============

FreeSerif and FreeSans function, with some limitations, with MATHML.

Mozilla Firefox supports MATHML.  To use it with GNU FreeFont, it is
necessary to specify FreeSerif or FreeSans in the 'about:config' setting
'font.name-list.serif.x-math'.  Note that the first font found in the list
is the one used for math.

Limitations include: 
1) vertical extension of symbols such as the integral
and brackets begins when font height is reached---whereas in many math
fonts, very high precomposed symbols are used.
2) The height of the summation and some other variable sized symbols is 
limited to font height.
3) A few extensible arrows don't extend correctly, although others do.
What triggers this is unknown.

Use with LibreOffice
====================

Font features can be turned on in LibreOffice Writer by an arcane trick.
In the little text box for the font name, append the desired feature setting
to the name of the font, with a colon (:) separating the font name from the
feature setting.  Typeing in this box
	FreeSerif:ss19=1
will turn Style Set 19 on.

(We can hope this will be made more user-friendly in the future.)

$Id: usage.txt 4134 2020-03-22 14:22:02Z Stevan_White $
