WhiteFontFace.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // WhiteFontFace.h
  3. // Whiteboard-Whiteboard
  4. //
  5. // Created by yleaf on 2020/12/1.
  6. //
  7. #import "WhiteObject.h"
  8. NS_ASSUME_NONNULL_BEGIN
  9. /**
  10. 字体配置文件,与 CSS 中的 FontFace 属性对应。
  11. */
  12. @interface WhiteFontFace : WhiteObject
  13. - (instancetype)init NS_UNAVAILABLE;
  14. - (instancetype)initWithFontFamily:(NSString *)name src:(NSString *)src;
  15. /**
  16. 字体名称,需要和 CSS 中 `font-family` 字段的值对应。
  17. */
  18. @property (nonatomic, strong) NSString *fontFamily;
  19. /**
  20. 字体样式,需要和 CSS 中 `font-style` 字段的值对应。默认值为 `normal`。
  21. */
  22. @property (nonatomic, strong, nullable) NSString *fontStyle;
  23. /**
  24. 字体粗细,需要和 CSS 中 `font-weight` 字段的值对应。
  25. */
  26. @property (nonatomic, strong, nullable) NSString *fontWeight;
  27. /**
  28. 字体文件的地址,需要和 CSS 中 `src` 字段的值对应。
  29. */
  30. @property (nonatomic, strong) NSString *src;
  31. /**
  32. 字体的字符编码范围,需要和 CSS 中 `unicode-range` 字段的值对应。
  33. */
  34. @property (nonatomic, strong, nullable) NSString *unicodeRange;
  35. @end
  36. NS_ASSUME_NONNULL_END