您的位置:首页 > 其它

font config 问题实践 001 - 如何获取font config的配置文件

2016-10-12 15:48 531 查看

1 引子 一个fontconfig 的配置错误:

Fontconfig error: Cannot load default config file


在配置海思板子的时候,我们遇到了一个font config的配置错误,如上fontcofig 找不到自己的库。

函数

FcConfigParseAndLoad (FcConfig      *config,

          const FcChar8 *name,

          FcBool      complain)

是fontconfig的Parse和load的函数,这题的错误在name的没有拿到。

2 阅读fontconfig的白皮书,用配置文件说明里的的默认路径,设定fontconfig的配置文件fonts.conf的默认路径:

To ensure that every system using Fontconfig shares a common configuration, the Fontconfig library
always uses the same configuration files by default. Font config searches for the fonts.conf
configuration file along the directories specified in the FONTCONFIG_PATH environment variable, and
also in /etc/fonts.


把配置文件fonts.conf copy到默认路径解决这个问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐