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

pull/43/merge
Behdad Esfahbod 11 years ago
parent 257d1adfa1
commit ce34f0b07e
  1. 4
      src/hb-open-type-private.hh
  2. 2
      src/hb-ot-cmap-table.hh

@ -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 */

@ -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);

Loading…
Cancel
Save