Font styles

Use the fontStyle style attribute to define the style of a font.

Syntax

{ italic | roman | oblique }

Usage

The style of a font can be specified with a generic name, interpreted by the front end according to the graphical capabilities of the platform. For example, on "Androidâ„¢ devices, italic and oblique result in the same font aspect.

Table 1. Generic font style
Generic font style name Definition
italic
Specifies an italic font style, using a typefact that slants slightly to the right. Uses a different glyph as the roman style.
oblique
Specifies an oblique font style. This style is similar to italic, except that it uses the same glyphs as the roman type, but distorted.
roman
Specifies a roman font style. This is the typical default font style in Latin-script typography.

Example

<StyleAttribute name="fontStyle" value="italic" />