4

I have MinionPro-Regular.otf file. I working with it's structure. I have found it have:

Table 'hhea': reference on 1668 metrics in 'hmtx' table. 
Table 'hmtx': 1668 pairs of hMetrics('advanceWidth', 'leftSideBearing').
Table 'CFF ': 1429 glyph names.
Table 'CFF ': param 'CharStrings' have offset to the index of 1668 elements. 
              Each element consist the Width property if it is not the same 
              as DefaultWidth.

CFF specification told as, that OTF font total glyphs quantity (or just presented in CFF stream of PDF file if the font is embedded) has to be:

  1. with predefined ISO Adobe charset (228 names) 1429 + 228 = 1649;
  2. with predefined "Expert" charset (115 names) 1429 + 115 = 1544;
  3. with predefined "Expert Subset" charset (86 names) 1429 + 116 = 1515.

The closest to 1668 number is 1649, but the difference 19 means I lost some thing important in this indexing idea.

The questions are:

  1. Where is relation between the names INDEX and the metrics/charstrings INDEX?
  2. Where is the FLAG, what kind of predefined charset in use?

IMPORTANT UPDATE

The Charsets do not matter! It was the wrong way!

4

1 回答 1

5

好的,我终于明白了!

高分辨率:https ://docs.google.com/drawings/pub?id=1gM7gs-ibJ_0qsUrsxIkF5rYUmC9Ix2F9WD9d3aqwc0g&w=1209&h=1179

它是如何工作的:

开放式字体文件 (OTF) 由hhea带有参数的numberOfHMetrics表格hmtx和带有字体中每个字形的水平度量数组的表格组成。

CFF表由字符串数组组成。version, Notes, FullName,FamilyName参数有 0...1428 个字形名称和 1429...1432 个字符串值。我的理解是,这 4 个字符串总是额外的。

现在我们有了Predefined Standard Strings- 全世界所有开放式字体都通用。如上所述,该表有 0...378 个常用字形名称和 379...390 个额外参数名称。

现在我们必须将两个名称表合并到一个数组中。预定义名称表的第一个元素,包括.nondef元素(这对我来说很奇怪,因为它是系统“无”,但正如我们看到的水平度量 500)和整个 CFF 字符串数组,除了参数的名称。元素的总数必须是numberOfHMetrics

我浪费了 60 个小时来了解整个情况。

于 2012-08-17T06:43:29.793 回答