ttf文件

byte

ttId                 [0X00, 0X03]

num_tables     [0X04, 0X05]

                        [0X06, 0X0B]  skip six bytes

tables tag and location 

可以查看itext\com\itextpdf\text\pdf\TrueTypeFont.java

StandardString (编码:WINANSI)

UnicodeString (编码:UNICODE)

typedef struct {

    table_tag : 4byte (转成String 时的编码为 WINANSI="Cp1252"或Unicode)

    checkSum: 4byte

    offset      :  1byte

    length    :1byte

}Table

table中是否有"CFF "tag

checkCff ??

table_tag="name"  offset + 2

numRecords            :[offset + 3, offset + 4] 2 byte

startOfStorage        :[offset + 5, offset + 6] 2 byte

16records

records struct {

    platformID                    : 2 byte (SampleValue=3,,,)

    platformEncodingID      : 2 byte (SampleValue=1)

    languageID                  :2 byte (SampleValue=1033)

    nameID                       :2 byte (SampleValue=0,1,2,3)

    length                          : 2 byte (SampleValue=100,,,60)

    offset                           : 2 byte (SampleValue=0,,,152)

}

No.platformIDplatformEncodingIDlanguageIDnameIDlength    offset    

13110330100
0
2311033138100
3311033214
138
43
11033360152
53
11033438
100
6311033524212
7


634236
8


7156270
93110338
40426
10311033928466
1131103310208494
123110331156702
133110331292758
143110331392850
1531103314
84942

fontName :DroidSansFallback

fullName :Droid Sans Fallback

familyName :Droid Sans Fallback

allNameEntries





0"Digitized data copyright Google Corporation © 2006"

1"Droid Sans Fallback"

2"Regular"

3"Ascender - Droid Sans Fallback"

4"Droid Sans Fallback"

5"Version 2.56"

6"DroidSansFallback"

7"Droid is a trademark of Google and may be registered in certain jurisdictions."

8"Ascender Corporation"

9"Steve Matteson"
10"Droid Sans is a humanist sans serif typeface designed for user interfaces and electronic communications."
11"http://www.ascendercorp.com/"
12"http://www.ascendercorp.com/typedesigners.html"
13"Licensed under the Apache License, Version 2.0"
14"http://www.apache.org/licenses/LICENSE-2.0"

相关资料

ttf

Text with and without kerning

baseline is the horizontal axis:

Glyph metric convention

the baseline is vertical, identical to the vertical axis:

vertical layout

table head struct {

    flags                    : 2 byte

    unitsPerEm          : 2 byte

    createTime           : 8 byte

    modifyTime          : 8 byte

    xMin                    : 2 byte (sign)

    yMin                    : 2 byte (sign)

    xMax                   : 2 byte (sign)

    yMax                   : 2 byte (sign)

    macStyle              : 2 byte (unsigned short)

}

table hhea struct {


}

可参考文档1 可参考文档2

转载于:https://my.oschina.net/u/557213/blog/373667

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值