To define the font, or the fonts to be used in a document, the
font-family
property is used. Prince will
try to use the specified font, and should glyphs be missing, it will silently
fall back to the next font in the cascade - typically a
generic font family.
To prevent this font switching mechanism and force Prince to only use the defined
font, the special keyword prince-no-fallback
is available: it triggers
a warning if any glyphs are not found in the specified font, instead of swithching
to another one.
Prince maps the CSS generic font families to the Microsoft Core Fonts. The Microsoft Core Fonts are pre-installed on Windows and MacOS X systems but not on Linux systems. To use them on Linux you must install the msttcorefonts package, which is available for most Linux distributions.
The following table shows the default fonts for the main languages on Windows, MacOS X and Linux.
Generic family | Operating system | Language | Actual font |
---|---|---|---|
serif |
Windows | Latin | Times New Roman |
Chinese | MingLiU | ||
Japanese | MS Mincho | ||
Korean | Batang | ||
Devanagari / Hindi | Mangal | ||
MacOS X | Latin | Times New Roman | |
Chinese | LiSong Pro | ||
Japanese | Hiragino Mincho ProN | ||
Korean | AppleMyungjo | ||
Devanagari / Hindi | Devanagari MT | ||
Linux | Latin | Times New Roman, DejaVu Serif, DejaVu LGC Serif, Liberation Serif | |
Chinese | AR PL UMing CN, AR PL SungtiL GB | ||
Japanese | Kochi Mincho, IPAMincho | ||
Korean | UnBatang, Baekmuk Batang | ||
Devanagari / Hindi | Lohit Devanagari | ||
sans-serif |
Windows | Latin | Arial |
Chinese | |||
Japanese | MS Gothic | ||
Korean | Dotum | ||
MacOS X | Latin | Arial | |
Chinese | LiHei Pro | ||
Japanese | Hiragino Kaku Gothic ProN | ||
Korean | Apple SD Gothic Neo, Apple Gothic | ||
Linux | Latin | Arial, DejaVu Sans, DejaVu LGC Sans, Liberation Sans | |
Chinese | AR PL UKai CN, AR PL KaitiM GB | ||
Japanese | Kochi Gothic, IPAGothic | ||
Korean | UnDotum, Baekmuk Gulim | ||
monospace |
Windows | Courier New | |
MacOS X | |||
Linux | Courier New, DejaVu Sans Mono, DejaVu LGC Sans Mono, Liberation Mono |
The complete list of defaults can be found in the fonts.css
file located
in the installation directory of Prince resources. (See Installation Layout).
In order to redefine these defaults, see Redefining the generic font families.
Prince supports OpenType features, and enables certain ones by default in specific scripts. Microsoft has a list of the OpenType feature names here. The following ones are enabled by default in Prince:
Script | Enabled features |
---|---|
Generic | ccmp, liga |
Arabic | ccmp, rlig, calt, liga, mset (plus others like isol/medi/fina) |
Indic | ccmp, and many other Indic-specific substitutions |
It is possible to enable other OpenType features by using the font-variant
CSS property with the prince-opentype()
function (see
Prince Specific Functions). Care must be taken in which order the features
are enabled! And please note that enabling one feature will disable all the default
features.