Dev:UIFont

Languages: English &bull; français

UIFont is a class representing a font face and the font size. This class is built on top of GSFont.

Default font sizes
There are 4 font sizes that can be obtained using +[UIFont someSize]. The last 2 are conventional values.

+fontWithFamilyName:traits:size:
Returns a font with specific family name, traits (bold/italic) and font size. For example:

+fontWithMarkupDescription:
Create a font using a CSS font description, e.g.

Unlike real CSS rules there are heavy restrictions on the "markup description":
 * The font-family rule must be exact. A list of fonts like Arial, Helvetica, sans-serif will not be supported by UIKit, and will always return nil regardless whether any font in the list is available.
 * The unit of font-size will always be interpreted as px. Names such as font-size: large will be considered as 0px.
 * font-weight can only be bold or not.
 * font-style can only be italic or not. In particular, oblique</tt> is not recognized and treated as normal</tt>.

-traits
Returns the traits (bold/italic) of the font.

-isFixedPitch
Returns whether the font is monospaced or not.

-markupDescription
Returns the CSS rules that can reproduce this font.