提交 f1a72fe7 编写于 作者: B Behdad Esfahbod

[ot-font] Fix cmap EncodingRecord cmp order

上级 ce34f0b0
...@@ -332,12 +332,12 @@ struct CmapSubtable ...@@ -332,12 +332,12 @@ struct CmapSubtable
struct EncodingRecord struct EncodingRecord
{ {
int cmp (const EncodingRecord &other) const inline int cmp (const EncodingRecord &other) const
{ {
int ret; int ret;
ret = other.platformID.cmp (platformID); ret = platformID.cmp (other.platformID);
if (ret) return ret; if (ret) return ret;
ret = other.encodingID.cmp (encodingID); ret = encodingID.cmp (other.encodingID);
if (ret) return ret; if (ret) return ret;
return 0; return 0;
} }
...@@ -382,7 +382,11 @@ struct cmap ...@@ -382,7 +382,11 @@ struct cmap
} }
USHORT version; /* Table version number (0). */ USHORT version; /* Table version number (0). */
ArrayOf<EncodingRecord> encodingRecord; /* Encoding tables. */ /* Note: We can use the Sorted array variant, but since it
* has no performance implications, we use non-sorted array and
* as such accept fonts with unsorted subtable list. */
/*Sorted*/ArrayOf<EncodingRecord>
encodingRecord; /* Encoding tables. */
public: public:
DEFINE_SIZE_ARRAY (4, encodingRecord); DEFINE_SIZE_ARRAY (4, encodingRecord);
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册