jre/lib/fontconfig.properties 格式说明

fontconfig.properties文件用于配置Java的中间字体,包括字体文件与字体名映射,中间字体与字体名映射,以及显示字符集的字体顺序。内容涉及Arial、Courier New、Times New Roman等常见字体及中文SimSun字体。中间字体有monospaced系列,分别对应plain, bold, italic, bolditalic四种样式,并支持多种字符集如GBK。通过sequence定义显示字符时的字体查找顺序。" 110903211,10294963,信息化视角下的需求理解:从定义到系统论,"['软件需求', '需求分析', '系统构建', '非功能性需求', '需求管理']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这个文件中用来配置Java的中间字体。它有三个部分:

1. 定义字体名和字体文件映射,格式为filename.字体名=字体文件。例如

filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF

filename.Courier_New=COUR.TTF
filename.Courier_New_Bold=COURBD.TTF
filename.Courier_New_Italic=COURI.TTF
filename.Courier_New_Bold_Italic=COURBI.TTF

filename.Times_New_Roman=TIMES.TTF
filename.Times_New_Roman_Bold=TIMESBD.TTF
filename.Times_New_Roman_Italic=TIMESI.TTF
filename.Times_New_Roman_Bold_Italic=TIMESBI.TTF

filename.SimSun=SIMSUN.TTC
filename.SimSun-18030=SIMSUN18030.TTC

注意:如果字体名中包含下划线,在是这个文件中使用这个字体名地方,可以用空格代替下划线。

2. 定义中间字体和字体名的映射,格式为
中间字体(也叫中间字体family)名.中间字体style.sub_name(任意的名字,这里为了和其他名字区别,将它认为是sub_name) = 字体名。例如

monospaced.plain.alphabetic=Courier New
monospaced.plain.chinese-ms950=MingLiU
monospaced.plain.hebrew=David
monospaced.plain.japanese=MS Gothic
monospaced.plain.korean=GulimChe

monospaced.bold.alphabetic=Courier New Bold
monospaced.bold.chinese-ms950=PMingLiU
monospaced.bold.hebrew=David Bold
monospaced.bold.japanese=MS Gothic
monospaced.bold.korean=GulimChe

monospaced.italic.alphabetic=Courier New Italic
monospaced.italic.chinese-ms950=PMingLiU
monospaced.italic.hebrew=David
monospaced.italic.japanese=MS Gothic
monospaced.italic.korean=GulimChe

monospaced.bolditalic.alphabetic=Courier New Bold Italic
monospaced.bolditalic.chinese-ms950=PMingLiU
monospaced.bolditalic.hebrew=David Bold
monospaced.bolditalic.japanese=MS Gothic
monospaced.bolditalic.korean=GulimChe

注意:
1)可以定义全局sub_name。格式为allfonts.sub_name = 字体名。例如

allfonts.chinese-ms936=SimSun
allfonts.chinese-gb18030=SimSun-18030

全局的sub_name对所以的中间字体可用。
2)对中间字体的每个sub_name,需要针对4个中间字体style定义4份。例如上面例子中的alphabetic sub_name
monospaced.plain.alphabetic=Courier New
monospaced.bold.alphabetic=Courier New Bold
monospaced.italic.alphabetic=Courier New Italic
monospaced.bolditalic.alphabetic=Courier New Bold Italic

3. 定义中间字体显示字符集使用字体的顺序,格式
sequence.中间字体名.字符集 = sub_name1, sub_name2 ...。例如

sequence.monospaced.GBK=chinese-ms936,alphabetic,dingbats,symbol

注意:这里的sub_name的取值范围是此中间字体名的sub_name和全局的sub_name。

显示字符时,如果当前指定了中间字体和字体style时,那么就查找“sequence.中间字体名.当前字符集” 的sequence。找到sequence之后根据第一个sub_name去查找
“中间字体名.中间字体style.sub_name”的中间字体和字体名的映射,然后根据真实的字体显示字符。如果根据第一个sub_name找到的真实的字体不能显示字符,那么使用第二个
sub_name,以此类推。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值