開發者 | 基思·帕卡德 |
---|---|
当前版本 | 2.14.1(2022年10月21日 | )
预览版本 | 2.13.96(2022年2月4日 | )
源代码库 | |
操作系统 | Unix-like 系统 |
类型 | 字体处理库 |
许可协议 | MIT許可證 |
网站 | www |
Fontconfig是一种与字體相關的计算机程序库,用于配置、定制全系统的字体,或將字體提供給应用程序使用。此庫最初是由基思·帕卡德(Keith Packard)开发维护的,现由贝赫达德·埃斯法赫博德(Behdad Esfahbod)维护。Fontconfig是自由软件,采用宽松开放版权许可证。[1]
应用程序可以通過兩種方式從fontconfig獲得字體:
为了进行字体匹配,fontconfig 保存所有已经安装字体的大量排版信息,例如字体名称、风格、大小、DPI、Unicode覆盖范围等。这些信息也被用来执行字体替换。
Fontconfig使用XML格式的配置文件。 Fontconfig的DTD文件通常位于/etc/fonts/fonts.dtd。
主配置文件是/etc/fonts/fonts.conf,引用少量的其他配置文件(有可能不存在):
一个简单的配置文件例子:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable antialiasing for all fonts -->
<match target="font">
<edit mode="assign" name="antialias"><bool>true</bool></edit>
</match>
</fontconfig>
更多细节,请参见fontconfig manual(页面存档备份,存于互联网档案馆) 。
fontconfig提供了8个命令行工具来管理字体配置:
Fontconfig建立在FreeType(一个字体渲染器)和expat(一个XML解析库)之上,这两个都是自由软件。
Fontmatrix 是一个有图形用户接口的交互工具,可以使用fontconfig列出可用的字体以及显示信息。
當fontconfig接近發布時,最末位版本號用大于等于90的數字表示。
Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Keith Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission...
|