Use the fontFamily style attribute to define a generic or specific font family.
This section describes the possible values of the fontFamily style attribute.
font-family [,...]
A set of generic font families is supported, that are interpreted by the front end according to the graphical capability of the paltform.
If the fontFamily is not a generic font family, it is interpreted as a native font family, which identifies a local font supported by the front-end. Usually, it is one of the fonts installed on the platform operating system. See front-end documentation for a list of supported native fonts.
A native font family should be used only if the front-end can't determine a proper default font family for the desired platform.
<StyleAttribute name="fontFamily" value="'Courier New'" />
<StyleAttribute name="fontFamily" value="'Times New Roman',Times,serif" />
Generic font family name | GDC | HTML5 | GMA | GMI |
---|---|---|---|---|
serif |
Times | serif (CSS) | Serif | Times New Roman |
sans-serif |
Arial | sans-serif (CSS) | Sans-Serif | Helvetica Neue |
cursive |
Comic Sans Ms | cursive (CSS) | N/A (keeps defauft font) | Marker Felt |
fantasy |
Algerian | fantasy (CSS) | N/A (keeps defauft font) | Papyrus |
monospace |
Courier New | monspace (CSS) | Monospace | Courier |
<StyleAttribute name="fontFamily" value="sans-serif" /> <StyleAttribute name="fontFamily" value="'Courier New'" /> <StyleAttribute name="fontFamily" value="'Times New Roman',Times,serif" />