フォント TrueType 構造解析 新しいページはコチラ
提供: yonewiki
(→hhea、hmtx) |
(→hhea、hmtx) |
||
708行: | 708行: | ||
各グリフの情報をもつという意味で'''h'''orizontal '''m'''a'''t'''ri'''x'''で、hmtxだと思われます。確度が高いとは思いますが、推測情報ばかりで申し訳ないです。 | 各グリフの情報をもつという意味で'''h'''orizontal '''m'''a'''t'''ri'''x'''で、hmtxだと思われます。確度が高いとは思いますが、推測情報ばかりで申し訳ないです。 | ||
+ | |||
+ | <big>'''■hhea'''</big> | ||
<table style = "width: 100 ; text-align: left; border-collapse: collapse; border-spacing: 0; "> | <table style = "width: 100 ; text-align: left; border-collapse: collapse; border-spacing: 0; "> | ||
857行: | 859行: | ||
つかっているプログラムは、もし完成することがあるならば有用なものになるかもしれないので、Qtのライセンスに触れない形式でアップロードするかもしれません。商用の扱いはダメですからね。 | つかっているプログラムは、もし完成することがあるならば有用なものになるかもしれないので、Qtのライセンスに触れない形式でアップロードするかもしれません。商用の扱いはダメですからね。 | ||
+ | |||
+ | |||
+ | |||
+ | <big>'''■hmtx'''</big> | ||
+ | |||
+ | <table style = "width: 100 ; text-align: left; border-collapse: collapse; border-spacing: 0; "> | ||
+ | <tr style = " background: #778ca3; border-right: solid 1px #778ca3; color: #ffffff; "> | ||
+ | <th style = "width: 200px; ">型</th> | ||
+ | <th style = "width: 200px; ">Name</th> | ||
+ | <th>説明</th> | ||
+ | </tr> | ||
+ | <tr style = " background: #eeeeee;"> | ||
+ | <td>longHorMetric</td> | ||
+ | <td>hMetrics[GlyphID]</td> | ||
+ | <td>グリフID毎のAdvaceWidthとLSB longHorMetric構造体は後述</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>short</td> | ||
+ | <td>leftSideBearing[GlyphID]</td> | ||
+ | <td>hMetricsで記述されなかった残りのグリフID毎のLSB</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | |||
+ | <big>'''※longHorMetric構造体'''</big> | ||
+ | |||
+ | <table style = "width: 100 ; text-align: left; border-collapse: collapse; border-spacing: 0; "> | ||
+ | <tr style = " background: #778ca3; border-right: solid 1px #778ca3; color: #ffffff; "> | ||
+ | <th style = "width: 200px; ">型</th> | ||
+ | <th style = "width: 200px; ">Name</th> | ||
+ | <th>説明</th> | ||
+ | </tr> | ||
+ | <tr style = " background: #eeeeee;"> | ||
+ | <td>unsigned short</td> | ||
+ | <td>advaceWidth</td> | ||
+ | <td>グリフの送り幅</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>short</td> | ||
+ | <td>leftSideBearing</td> | ||
+ | <td>グリフのLSB</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | hmtxでは、グリフの送り幅とLSBを構造体の形式とみなしてGlyphID順に読み込んでいきます。hheaのNumberOfMetricsで定義された分だけ構造体が配列のように読み取ることができるようになっています。maxpで定義されたNumGlyphsの値よりNumberOfMetricsが少ない場合は、残りのadvanceWidthは配列の最後の値がすべてに適用されます。残りのLSBは別途、グリフ毎に定義することが必要になっています。 | ||
== '''関連記事''' == | == '''関連記事''' == |