フォーマットの概要
| Offset Table |
| Table Directory 1 |
| Table Directory 2 |
| Table Directory 3 |
| ・・・ |
| Table Directory n |
| Table 1 |
| Table 2 |
| Table 3 |
| ・・・ |
| Table n |
Offset Table
| データ型 |
名称 |
説明 |
| Fixed |
afnt version |
バージョン 0x00010000 (=ver.1.0固定) |
| USHORT |
numTables |
テーブル数 |
| USHORT |
searchRange |
(Maximum power of 2 < numTables) x 16 |
| USHORT |
entrySelector |
Log2(maximum power of 2 < numTables) |
| USHORT |
rangeShift |
NumTables x 16-searchRange |
searchRange,entrySelector,rangeShiftについては良くわからない。
Table Directory
| データ型 |
名称 |
説明 |
| ULONG |
tag |
テーブル識別名 |
| ULONG |
checkSum |
チェックサム |
| ULONG |
offset |
ファイル先頭からテーブルまでのオフセット |
| ULONG |
length |
テーブルのデータ長 |
Table
テーブルには何種類かある。
説明はほぼ英文の直訳
| Tag |
Name |
説明 |
| cmap |
character to glyph mapping |
文字コードと字形データのマッピング |
| glyf |
glyph data |
字形データ |
| head |
font header |
フォントのヘッダ |
| hhea |
horizontal header |
横書き用情報のヘッダ |
| hmtx |
horizontal metrics |
横書き用のメトリクス |
| loca |
index to location |
字形データへのインデックス |
| maxp |
maximum profile |
最大値集合 |
| name |
naming table |
フォント名テーブル |
| post |
PostScript information |
postScript情報 |
| OS/2 |
OS/2 and Windows specific metrics |
OS/2,Windows専用メトリクス |
| Tag |
Name |
説明 |
| cvt |
Control Value Table |
コントロール値テーブル |
| EBDT |
Embedded bitmap data |
埋め込みビットマップデータ |
| EBLC |
Embedded bitmap location data |
埋め込みビットマップの位置データ |
| EBSC |
Embedded bitmap scaling data |
埋め込みビットマップのスケーリングデータ |
| fpgm |
font program |
フォントプログラム |
| gasp |
grid-fitting and scan conversion procedure (grayscale) |
グリッド調整およびスキャン変換手続き(グレースケール) |
| hdmx |
horizontal device metrics |
水平デバイスメトリクス |
| kern |
kerning |
カーニング(字間) |
| LTSH |
Linear threshold table |
線形閾値 |
| prep |
CVT Program |
CVTプログラム |
| PCLT |
PCL5 |
PCL5データ |
| VDMX |
Vertical Device Metrics |
垂直デバイスメトリクス |
| vhea |
Vertical Metrics header |
縦書き用情報のヘッダ |
| vmtx |
Vertical Metrics |
縦書き用のメトリクス |
naming table
| データ型 |
名称 |
説明 |
| USHORT |
Format selector |
フォーマットセレクタ(0固定のようだ) |
| USHORT |
Number of NameRecords that follown n |
フォント名レコード数 |
| USHORT |
Offset to start of string storage (from start of table) |
文字列データ領域へのテーブルの先頭からのオフセット |
NameRecord
| データ型 |
名称 |
説明 |
| USHORT |
Platform ID |
プラットフォームID |
| USHORT |
Platform-specific encoding ID |
エンコーディングID |
| USHORT |
Language ID |
言語ID |
| USHORT |
Name ID |
名称ID |
| USHORT |
String length(in bytes) |
文字列長(byte単位) |
| USHORT |
String offset from start of storage area (in bytes) |
文字列データへのデータ領域からのオフセット |
PlatformID
| ID |
Platform |
| 0 |
Apple Unicode |
| 1 |
Macintosh |
| 2 |
ISO |
| 3 |
Microsoft |
MicrosoftのPlatform-specific encoding ID
| ID |
encoding |
| 0 |
文字セットなし |
| 1 |
Unicode |
Language ID
| ID |
Locale Name |
| 0x0409 |
英語(米国) |
| 0x0411 |
日本語(日本) |
Name ID
| ID |
意味 |
| 0 |
Copyright notice |
| 1 |
Font Family name |
| 2 |
Font Subfamily name |
| 3 |
Unique font identifier |
| 4 |
Full font name |
| 5 |
Version string |
| 6 |
Postscript name |
| 7 |
Trademark |
他のテーブルは割愛
参考資料
- MicrosoftのTrueTypeFontとOpenTypeFontに関する文献(英語)
ここのTrueType SpecificationのCahpter2にフォーマットに関しての記述がある。
- Microsoftが提供するFontTools
- フリーのTrueTypeFont解析ツール
最終更新:2011年09月27日 17:17