[ot-font] Use binary search for format12 cmap subtable

This commit is contained in:
Behdad Esfahbod 2014-06-04 18:57:46 -04:00
parent 257d1adfa1
commit ce34f0b07e
2 changed files with 5 additions and 1 deletions

View File

@ -985,6 +985,10 @@ struct GenericSortedArrayOf : GenericArrayOf<LenType, Type>
template <typename Type>
struct SortedArrayOf : GenericSortedArrayOf<USHORT, Type> {};
/* A sorted array with a ULONG number of elements. */
template <typename Type>
struct LongSortedArrayOf : GenericSortedArrayOf<ULONG, Type> {};
} /* namespace OT */

View File

@ -264,7 +264,7 @@ struct CmapSubtableLongSegmented
USHORT reserved; /* Reserved; set to 0. */
ULONG length; /* Byte length of this subtable. */
ULONG language; /* Ignore. */
LongArrayOf<CmapSubtableLongGroup>
LongSortedArrayOf<CmapSubtableLongGroup>
groups; /* Groupings. */
public:
DEFINE_SIZE_ARRAY (16, groups);