gpt4 book ai didi

truetype - OpenType的cmap中platformID和encodingID是什么意思?

转载 作者:行者123 更新时间:2023-12-04 07:00:49 25 4
gpt4 key购买 nike

规范( http://www.microsoft.com/typography/otspec/cmap.htm )在 windows 平台中只有 platformID 3(windows) 和 platformID 1(Mac) 和 encodingID。 Windows 之外的其他平台和其他编码怎么样?

我用 ttfdump转储一种 adobe 字体,它给了我:

'cmap' Table - Character to Glyph Index Mapping Table
-----------------------------------------------------
'cmap' version: 0
number of encodings: 5
number of subtables: 3

Encoding 0. PlatformID: 0
EcodingID: 3
SubTable: 0, Offset: 0x00000a0e

Encoding 1. PlatformID: 0
EcodingID: 4
SubTable: 1, Offset: 0x0000cc26

Encoding 2. PlatformID: 1
EcodingID: 25
SubTable: 2, Offset: 0x0000002c

Encoding 3. PlatformID: 3
EcodingID: 1
SubTable: 0, Offset: 0x00000a0e

Encoding 4. PlatformID: 3
EcodingID: 10
SubTable: 1, Offset: 0x0000cc26

所以它确实有其他平台和编码,但在哪里可以找到定义?

最佳答案

Microsoft documentation中有下表:

 Platform ID  | Platform name | Platform-specific encoding IDs  | Language IDs
-------------|---------------|---------------------------------|--------------
0 | Unicode | Various | Various
1 | Macintosh | Script manager code | Various
2 | ISO [deprec] | ISO encoding [deprecated] | None
3 | Windows | Windows encoding | Various
4 | Custom | Custom | None

关于非标准编码 ID:

A new encoding ID for the Unicode platform will be assigned if a new version of Unicode moves characters, in order to properly specify character code semantics.(Because of Unicode stability policies, such a need is not anticipated.) The distinction between Unicode platform-specific encoding IDs 1 and 2 is for historical reasons only; the Unicode Standard is in fact identical in repertoire and encoding to ISO 10646. For all practical purposes in current fonts, the distinctions provided by encoding IDs 0, 1 and 2 are not important, thus these encoding IDs are deprecated.

A new encoding ID for the Unicode platform is also sometimes assigned when new cmap subtable formats are added to the specification, so as to allow for compatibility with existing parsers. For example, when cmap subtable formats 10 and 12 were added to the specification, encoding ID 4 was added as well, and when cmap subtable format 13 was added to the specification, encoding ID 6 was added. The cmap subtable formats listed in the table above are the only ones that may be used for the corresponding encoding ID.

关于truetype - OpenType的cmap中platformID和encodingID是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25281928/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com