Generic Font Family
平面设计和前端中,通用字体族 指看起来相似的字体分组的名称。
当前有如下通用字体族:
serif
衬线字体sans-serif
无衬线字体monospace
手写体cursive
幻想体fantasy
等宽字体system-ui
平台默认的 UI 字体emoji
用于 Emoji 表情math
用于数学表达式fangsong
仿宋体
CSS Fonts Module Level 3
There are two types of font family names:[1]
- family-name
- The name of a font family of choice such as Helvetica or Verdana in the previous example.
- generic-family
- The following generic family keywords are defined: ‘serif’, ‘sans-serif’, ‘cursive’, ‘fantasy’, and ‘monospace’. These keywords can be used as a general fallback mechanism when an author's desired font choices are not available. As keywords, they must not be quoted. Authors are encouraged to append a generic font family as a last alternative for improved robustness.
Understanding Generic Font Family Names in CSS
The term "Generic font family name" refers to the name of a group of font families that look similar, CSS relies on the characteristics of the fonts to classify them.[2]