WhiteFontFace Class Reference

Inherits from WhiteObject
Declared in WhiteFontFace.h

Overview

Font file configurations. This class is similar to the @font-face attribute in CSS.

  fontFamily

The font name.

@property (nonatomic, strong) NSString *fontFamily

Discussion

This parameter is equivalent to the font-family field in CSS.

Declared In

WhiteFontFace.h

  fontStyle

The font style.

@property (nonatomic, strong, nullable) NSString *fontStyle

Discussion

This parameter is equivalent to the font-style field in CSS, and can be set to:

  • normal:(Default) Normal.
  • italic:Italic.

Declared In

WhiteFontFace.h

  fontWeight

The font weight.

@property (nonatomic, strong, nullable) NSString *fontWeight

Discussion

This parameter is equivalent to the font-weight field in CSS.

Declared In

WhiteFontFace.h

  src

The path to the font file.

@property (nonatomic, strong) NSString *src

Discussion

This parameter is equivalent to the src field in CSS. The supported format is url(), where you can fill in the URL to a remote font file location, for example, url("https://white-pan.oss-cn-shanghai.aliyuncs.com/Pacifico-Regular.ttf").

Declared In

WhiteFontFace.h

  unicodeRange

The range of Unicode code points to be used by the font.

@property (nonatomic, strong, nullable) NSString *unicodeRange

Discussion

This parameter is equivalent to the unicode-range field in CSS.

Declared In

WhiteFontFace.h