Skip to content

Font 和 Glyph 的关系

  • Font 是从 characterglyph 的桥梁。

  • Font 根据 character 这一抽象输入提供 glyph 这一具象输出。

  • Font 的本质是存储了 characterglyph 的映射方式(程序的一面)以及 glyph 图形(设计的一面)的数据库。

Font

这里有一篇文章详细的说明了字体匹配策略、以及属性介绍

英文版:

Fonts (w3.org)

中文版:

字体 (ayqy.net)

Glyph

Glyph 指的是文字元素的图形

示例:

Pacifico Regular | 233 Glyphs

image-20221214172312680

image-20221214172329553

查看字体信息

可以安装 fontconfig 查看字体信息

bash
# 在 macOS 上可以使用 Homebrew 安装
brew install fontconfig
bash
# 在 Linux 上
sudo apt install fontconfig
bash
# 查看字体信息
fc-scan xxx.ttf // [!code  focus]

# 查看本地支持的字体
fc-list

Released under the MIT License.