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. | platformID | platformEncodingID | languageID | nameID | length | offset |
1 | 3 | 1 | 1033 | 0 | 100 | 0 |
2 | 3 | 1 | 1033 | 1 | 38 | 100 |
3 | 3 | 1 | 1033 | 2 | 14 | 138 |
4 | 3 | 1 | 1033 | 3 | 60 | 152 |
5 | 3 | 1 | 1033 | 4 | 38 | 100 |
6 | 3 | 1 | 1033 | 5 | 24 | 212 |
7 | 6 | 34 | 236 | |||
8 | 7 | 156 | 270 | |||
9 | 3 | 1 | 1033 | 8 | 40 | 426 |
10 | 3 | 1 | 1033 | 9 | 28 | 466 |
11 | 3 | 1 | 1033 | 10 | 208 | 494 |
12 | 3 | 1 | 1033 | 11 | 56 | 702 |
13 | 3 | 1 | 1033 | 12 | 92 | 758 |
14 | 3 | 1 | 1033 | 13 | 92 | 850 |
15 | 3 | 1 | 1033 | 14 | 84 | 942 |
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" |
baseline is the horizontal axis:
the baseline is vertical, identical to the vertical axis:
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 {
}