本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/140576759
代码
1 |
|
输出
fontPath:C:\Windows\fonts\GOTHIC.TTF,family:Century Gothic,style:0
Pattern has 5 elts (size 16)
family: “Century Gothic”(s)
style: “Regular”(s) “Normal”(s) “obyčejné”(s) “Standard”(s) “Κανονικά”(s) “Normaali”(s) “Normál”(s) “Normale”(s) “Standaard”(s) “Normalny”(s) “Обычный”(s) “Normálne”(s) “Navadno”(s) “Arrunta”(s)
slant: 0(i)(s)
weight: 80(f)(s)
file: “C:/Windows/fonts\GOTHIC.TTF”(s)
C:/Windows/fonts\GOTHIC.TTF: Century Gothic:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta:slant=0:weight=80
Pattern has 26 elts (size 32)
family: “Liberation Sans”(s)
familylang: “en”(s)
style: “Bold”(s)
stylelang: “en”(s)
fullname: “Liberation Sans Bold”(s)
fullnamelang: “en”(s)
slant: 0(i)(s)
weight: 200(f)(s)
width: 100(f)(s)
foundry: “1ASC”(s)
file: “C:\Fonts\LiberationSans-Bold.ttf”(s)
index: 0(i)(s)
outline: True(s)
scalable: True(s)
charset:
0000: 00000000 ffffffff ffffffff 7fffffff 00000000 ffffffff ffffffff ffffffff
0001: ffffffff ffffffff ffffffff ffffffff 00040000 00000000 00000000 fc000000
0002: 0f000000 00000000 00000000 00000000 00000000 00000000 3f0002c0 00000000
0003: 00000000 00000000 00000000 40000000 ffffd7f0 fffffffb 00007fff 00000000
0004: ffffffff ffffffff ffffffff 000c0000 00030000 00000000 00000000 00000000
001e: 00000000 00000000 00000000 00000000 0000003f 00000000 00000000 000c0000
0020: 7fbb0000 560d0047 00000010 80000000 00000000 00001098 00000000 00000000
0021: 00480020 00004044 78000000 00000000 003f0000 00000100 00000000 00000000
0022: c6268044 00000a00 00000100 00000033 00000000 00000000 00000000 00000000
0023: 00010004 00000003 00000000 00000000 00000000 00000000 00000000 00000000
0025: 11111005 10101010 ffff0000 00001fff 000f1111 14041c03 03008c10 00000040
0026: 00000000 1c000000 00000005 00001c69 00000000 00000000 00000000 00000000
00f0: 00000026 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00fb: 00000006 00000000 00000000 00000000 00000000 00000000 00000000 00000000
(s)
lang: aa|af|av|ay|be|bg|bi|br|bs|ca|ce|ch|co|cs|cy|da|de|el|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gv|ho|hr|hu|ia|id|ie|ik|io|is|it|ki|kl|kum|la|lb|lez|lt|lv|mg|mh|mk|mo|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ro|ru|se|sel|sk|sl|sma|smj|smn|so|sq|sr|ss|st|sv|sw|tk|tl|tn|tr|ts|uk|uz|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za(s)
fontversion: 70123(i)(s)
capability: “otlayout:DFLT otlayout:cyrl otlayout:grek otlayout:latn”(s)
fontformat: “TrueType”(s)
decorative: False(s)
postscriptname: “LiberationSans-Bold”(s)
color: False(s)
symbol: False(s)
variable: False(s)
fonthashint: True(s)
order: 0(i)(s)
参考
https://github.com/freedesktop/fontconfig
https://github.com/ShiftMediaProject/fontconfig
https://github.com/benoitkugler/textlayout
https://github.com/benoitkugler/textprocessing
https://github.com/go-text/typesetting
创作不易,小小的支持一下吧!

