27 #ifndef HB_OT_CMAP_TABLE_HH
28 #define HB_OT_CMAP_TABLE_HH
37 #define HB_OT_TAG_cmap HB_TAG('c','m','a','p')
60 for (
unsigned int i = 0;
i < 256;
i++)
68 for (
unsigned i = 0;
i < 256;
i++)
97 template<
typename Iterator,
102 hb_codepoint_t start_cp = 0, prev_run_start_cp = 0, run_start_cp = 0, end_cp = 0, last_gid = 0;
103 int run_length = 0 , delta = 0, prev_delta = 0;
112 start_cp = (*it).first;
113 prev_run_start_cp = (*it).first;
114 run_start_cp = (*it).first;
115 end_cp = (*it).first;
116 last_gid = (*it).second;
120 delta = (*it).second - (*it).first;
121 mode = FIRST_SUB_RANGE;
128 if (next_cp != end_cp + 1) {
133 if (next_gid == last_gid + 1) {
143 int split_cost = (
mode == FIRST_SUB_RANGE) ? 8 : 16;
144 int run_cost = run_length * 2;
145 if (run_cost >= split_cost) {
158 mode = FOLLOWING_SUB_RANGE;
159 prev_run_start_cp = run_start_cp;
160 run_start_cp = next_cp;
163 delta = next_gid - run_start_cp;
180 if (
likely (end_cp != 0xFFFF)) {
181 range_writer (0xFFFF, 0xFFFF, 1);
188 template<
typename Writer>
194 int previous_run_delta,
196 Writer& range_writer) {
197 bool should_split =
false;
198 if (
start < run_start && run_start <
end) {
199 int run_cost = (
end - run_start + 1) * 2;
200 if (run_cost >= split_cost) {
207 if (
start == prev_run_start)
208 range_writer (
start, run_start - 1, previous_run_delta);
210 range_writer (
start, run_start - 1, 0);
211 range_writer (run_start,
end, run_delta);
216 if (
start == run_start) {
218 range_writer (
start,
end, run_delta);
226 template<
typename Iterator,
230 unsigned segcount = 0;
244 template<
typename Iterator,
258 : serializer_(serializer),
260 start_code_(
nullptr),
266 start_code_[index_] =
start;
267 end_code_[index_] =
end;
268 id_delta_[index_] = delta;
273 writer.end_code_ =
c->allocate_size<
HBUINT16> (HBUINT16::static_size * segcount);
275 writer.start_code_ =
c->allocate_size<
HBUINT16> (HBUINT16::static_size * segcount);
276 writer.id_delta_ =
c->allocate_size<
HBINT16> (HBINT16::static_size * segcount);
278 if (
unlikely (!writer.end_code_ || !writer.start_code_ || !writer.id_delta_))
return false;
284 template<
typename Iterator,
294 +
it | hb_sink (cp_to_gid);
296 HBUINT16 *idRangeOffset =
c->allocate_size<
HBUINT16> (HBUINT16::static_size * segcount);
297 if (
unlikely (!
c->check_success (idRangeOffset)))
return nullptr;
298 if (
unlikely ((
char *)idRangeOffset - (
char *)idDelta != (
int) segcount * (
int) HBINT16::static_size))
return nullptr;
300 for (
unsigned i : + hb_range (segcount)
301 | hb_filter ([&] (
const unsigned _) {
return idDelta[
_] == 0; }))
303 idRangeOffset[
i] = 2 * (
c->start_embed<
HBUINT16> () - idRangeOffset -
i);
312 return idRangeOffset;
315 template<
typename Iterator,
323 {
return _.first <= 0xFFFF; })
326 if (format4_iter.len () == 0)
return;
328 unsigned table_initpos =
c->length ();
329 if (
unlikely (!
c->extend_min (
this)))
return;
338 HBUINT16 *startCode = endCode + segcount + 1;
342 if (
unlikely (!
c->check_success (idRangeOffset)))
return;
344 this->
length =
c->length () - table_initpos;
345 if ((
long long) this->
length != (
long long)
c->length () - table_initpos)
356 this->
entrySelector = hb_max (1u, hb_bit_storage (segcount)) - 1;
391 if (k > last)
return +1;
392 if (k < (&last)[
distance])
return -1;
398 const HBUINT16 *found = hb_bsearch (codepoint,
402 _hb_cmp_method<hb_codepoint_t, CustomRange, unsigned>,
410 if (rangeOffset == 0)
421 gid += this->idDelta[
i];
436 if (count && this->
startCount[count - 1] == 0xFFFFu)
438 for (
unsigned int i = 0;
i <
count;
i++)
443 if (rangeOffset == 0)
450 out->add (codepoint);
463 out->add (codepoint);
473 if (count && this->
startCount[count - 1] == 0xFFFFu)
475 for (
unsigned i = 0;
i <
count;
i++)
480 if (rangeOffset == 0)
487 unicodes->
add (codepoint);
501 unicodes->
add (codepoint);
546 uint16_t new_length = (uint16_t) hb_min ((uintptr_t) 65535,
547 (uintptr_t) (
c->end -
549 if (!
c->try_set (&
length, new_length))
595 if (codepoint < startCharCode)
return -1;
596 if (codepoint > endCharCode)
return +1;
616 template <
typename UINT>
638 for (
unsigned int i = 0;
i <
count;
i++)
648 for (
unsigned i = 0;
i <
count;
i++)
653 unicodes->
add (unicode);
654 mapping->set (unicode, glyphid);
679 template <
typename T>
700 for (
unsigned int i = 0;
i < this->
groups.len;
i++)
709 if (! T::group_get_glyph (this->
groups[
i],
end))
continue;
713 if (
unlikely ((
unsigned int) gid >= num_glyphs))
continue;
723 unsigned num_glyphs)
const
725 for (
unsigned i = 0;
i < this->
groups.len;
i++)
734 if (! T::group_get_glyph (this->
groups[
i],
end))
continue;
738 if (
unlikely ((
unsigned int) gid >= num_glyphs))
continue;
742 for (
unsigned cp =
start; cp <=
end; cp++)
776 template<
typename Iterator,
781 if (
it.len () == 0)
return;
782 unsigned table_initpos =
c->length ();
783 if (
unlikely (!
c->extend_min (
this)))
return;
788 for (
const auto&
_ : +
it)
790 if (startCharCode == 0xFFFF)
792 startCharCode =
_.first;
793 endCharCode =
_.first;
796 else if (!_is_gid_consecutive (endCharCode, startCharCode, glyphID,
_.first,
_.second))
799 grouprecord.startCharCode = startCharCode;
800 grouprecord.endCharCode = endCharCode;
801 grouprecord.glyphID = glyphID;
804 startCharCode =
_.first;
805 endCharCode =
_.first;
809 endCharCode =
_.first;
813 record.startCharCode = startCharCode;
814 record.endCharCode = endCharCode;
820 this->length =
c->length () - table_initpos;
821 this->
groups.len = (this->length - min_size)/CmapSubtableLongGroup::static_size;
825 {
return 16 + 12 * groups_data.
length; }
834 return (cp - 1 == endCharCode) &&
835 new_gid == glyphID + (cp - startCharCode);
844 {
return group.glyphID; }
881 for (
unsigned int i = 0;
i <
count;
i++)
886 out->add_range (
first, hb_min (last, 0x10FFFFu));
895 auto snap =
c->snapshot ();
900 unsigned init_len =
c->length ();
907 for (
const unsigned addcnt : hb_range ((
unsigned)
_.additionalCount + 1))
909 unsigned curEntry = (unsigned)
_.startUnicodeValue + addcnt;
910 if (!unicodes->
has (curEntry))
continue;
914 else if (lastCode +
count != curEntry)
935 if (
c->length () - init_len == 0)
943 (
c->length () - init_len) / UnicodeValueRange::static_size,
975 out->add (
a.unicodeValue);
985 unicodes->
add (unicode);
986 mapping->set (unicode, glyphid);
1012 return unicodes->
has (
_.unicodeValue) || glyphs_requested->
has (
_.glyphID);
1016 if (!
it)
return nullptr;
1025 mapping.unicodeValue =
_.unicodeValue;
1041 const void *
base)
const
1098 const void *
base)
const
1100 auto snap =
c->snapshot ();
1104 out->defaultUVS = 0;
1105 out->nonDefaultUVS = 0;
1107 unsigned non_default_uvs_objidx = 0;
1112 non_default_uvs_objidx =
c->pop_pack ();
1113 else c->pop_discard ();
1116 unsigned default_uvs_objidx = 0;
1121 default_uvs_objidx =
c->pop_pack ();
1122 else c->pop_discard ();
1126 if (!default_uvs_objidx && !non_default_uvs_objidx)
1129 return hb_pair (default_uvs_objidx, non_default_uvs_objidx);
1146 {
return record.bsearch (variation_selector).get_glyph (codepoint, glyph,
this); }
1150 for (
const auto&
a :
record.as_array ())
1151 out->add (
a.varSelector);
1155 {
record.bsearch (variation_selector).collect_unicodes (
out,
this); }
1163 auto snap =
c->snapshot ();
1164 unsigned table_initpos =
c->length ();
1165 const char* init_tail =
c->tail;
1167 if (
unlikely (!
c->extend_min (
this)))
return;
1186 for (
int i = src_tbl->record.len - 1;
i >= 0;
i--)
1193 if (
c->length () - table_initpos == CmapSubtableFormat14::min_size)
1202 int tail_len = init_tail -
c->tail;
1203 c->check_assign (this->length,
c->length () - table_initpos + tail_len,
1205 c->check_assign (this->
record.len,
1206 (c->
length () - table_initpos - CmapSubtableFormat14::min_size) /
1207 VariationSelectorRecord::static_size,
1220 record.as_array ().reverse ();
1226 for (
unsigned i = 0;
i < obj_indices.length;
i++)
1233 int j = obj_indices.length - 1 -
i;
1235 c->add_link (
record[
j].nonDefaultUVS, obj_indices[
i].second);
1246 | hb_apply ([=] (
const NonDefaultUVS&
_) {
_.closure_glyphs (unicodes, glyphset); })
1253 _.collect_unicodes (
out,
this);
1260 _.collect_mapping (
this, unicodes,
mapping);
1288 case 0:
return u.format0 .get_glyph (codepoint, glyph);
1289 case 4:
return u.format4 .get_glyph (codepoint, glyph);
1290 case 6:
return u.format6 .get_glyph (codepoint, glyph);
1291 case 10:
return u.format10.get_glyph (codepoint, glyph);
1292 case 12:
return u.format12.get_glyph (codepoint, glyph);
1293 case 13:
return u.format13.get_glyph (codepoint, glyph);
1295 default:
return false;
1301 case 0:
u.format0 .collect_unicodes (
out);
return;
1302 case 4:
u.format4 .collect_unicodes (
out);
return;
1303 case 6:
u.format6 .collect_unicodes (
out);
return;
1304 case 10:
u.format10.collect_unicodes (
out);
return;
1305 case 12:
u.format12.collect_unicodes (
out, num_glyphs);
return;
1306 case 13:
u.format13.collect_unicodes (
out, num_glyphs);
return;
1314 unsigned num_glyphs = UINT_MAX)
const
1317 case 0:
u.format0 .collect_mapping (unicodes,
mapping);
return;
1318 case 4:
u.format4 .collect_mapping (unicodes,
mapping);
return;
1319 case 6:
u.format6 .collect_mapping (unicodes,
mapping);
return;
1320 case 10:
u.format10.collect_mapping (unicodes,
mapping);
return;
1321 case 12:
u.format12.collect_mapping (unicodes,
mapping, num_glyphs);
return;
1322 case 13:
u.format13.collect_mapping (unicodes,
mapping, num_glyphs);
return;
1331 case 0:
return u.format0 .get_language ();
1332 case 4:
return u.format4 .get_language ();
1333 case 6:
return u.format6 .get_language ();
1334 case 10:
return u.format10.get_language ();
1335 case 12:
return u.format12.get_language ();
1336 case 13:
return u.format13.get_language ();
1342 template<
typename Iterator,
1351 case 4:
return u.format4.serialize (
c,
it);
1352 case 12:
return u.format12.serialize (
c,
it);
1409 template<
typename Iterator,
1416 unsigned *objidx)
const
1419 auto snap =
c->snapshot ();
1420 auto *
out =
c->embed (
this);
1427 unsigned origin_length =
c->length ();
1429 if (
c->length () - origin_length > 0) *objidx =
c->pop_pack ();
1430 else c->pop_discard ();
1439 c->add_link (
out->subtable, *objidx);
1455 template<
typename Iterator,
typename EncodingRecIter,
1459 EncodingRecIter encodingrec_iter,
1462 bool drop_format_4 =
false)
1464 if (
unlikely (!
c->extend_min ((*
this))))
return false;
1467 unsigned format4objidx = 0, format12objidx = 0, format14objidx = 0;
1468 auto snap =
c->snapshot ();
1479 (
base+
_.subtable).collect_unicodes (&unicodes_set);
1481 if (!drop_format_4 &&
format == 4)
1483 c->copy (
_, +
it | hb_filter (unicodes_set, hb_first), 4u,
base, plan, &format4objidx);
1484 if (
c->in_error () &&
c->only_overflow ())
1499 c->copy (
_, +
it | hb_filter (unicodes_set, hb_first), 12u,
base, plan, &format12objidx);
1501 else if (
format == 14)
c->copy (
_,
it, 14u,
base, plan, &format14objidx);
1504 (c->
length () - cmap::min_size)/EncodingRecord::static_size,
1508 return !drop_format_4 || format12objidx;
1511 template<
typename Iterator,
typename EncodingRecordIterator,
1517 Iterator subset_unicodes,
1518 EncodingRecordIterator encoding_records)
1520 for (
auto cp : + subset_unicodes | hb_filter (cmap12_unicodes))
1522 if (cp >= 0x10000)
return false;
1525 unsigned target_platform;
1526 unsigned target_encoding;
1527 unsigned target_language = (
base+cmap12.
subtable).get_language ();
1531 target_platform = 0;
1532 target_encoding = 3;
1534 target_platform = 3;
1535 target_encoding = 1;
1540 for (
const auto&
_ : encoding_records)
1542 if (
_.platformID != target_platform
1543 ||
_.encodingID != target_encoding
1544 || (
base+
_.subtable).get_language() != target_language)
1548 (
base+
_.subtable).collect_unicodes (&sibling_unicodes);
1550 auto cmap12 = + subset_unicodes | hb_filter (cmap12_unicodes);
1551 auto sibling = + subset_unicodes | hb_filter (sibling_unicodes);
1552 for (; cmap12 && sibling; cmap12++, sibling++)
1554 unsigned a = *cmap12;
1555 unsigned b = *sibling;
1556 if (
a !=
b)
return false;
1559 return !cmap12 && !sibling;
1571 | hb_filter ([&] (
const CmapSubtable&
_) {
return _.u.format == 14; })
1572 | hb_apply ([=] (
const CmapSubtable&
_) {
_.u.format14.closure_glyphs (unicodes, glyphset); })
1580 cmap *cmap_prime =
c->serializer->start_embed<
cmap> ();
1583 auto encodingrec_iter =
1587 if ((
_.platformID == 0 &&
_.encodingID == 3) ||
1588 (
_.platformID == 0 &&
_.encodingID == 4) ||
1589 (
_.platformID == 3 &&
_.encodingID == 1) ||
1590 (
_.platformID == 3 &&
_.encodingID == 10) ||
1591 (
this +
_.subtable).u.format == 14)
1600 const EncodingRecord *unicode_bmp=
nullptr, *unicode_ucs4 =
nullptr, *ms_bmp =
nullptr, *ms_ucs4 =
nullptr;
1601 bool has_format12 =
false;
1605 unsigned format = (
this +
_.subtable).
u.format;
1606 if (
format == 12) has_format12 =
true;
1609 if (
_.platformID == 0 &&
_.encodingID == 3) unicode_bmp =
table;
1610 else if (
_.platformID == 0 &&
_.encodingID == 4) unicode_ucs4 =
table;
1611 else if (
_.platformID == 3 &&
_.encodingID == 1) ms_bmp =
table;
1612 else if (
_.platformID == 3 &&
_.encodingID == 10) ms_ucs4 =
table;
1619 + hb_iter (
c->plan->unicodes)
1623 c->plan->new_gid_for_codepoint (
_, &new_gid);
1635 if (symbol) *symbol =
false;
1644 if (symbol) *symbol =
true;
1649 if ((subtable = this->
find_subtable (3, 10)))
return subtable;
1650 if ((subtable = this->
find_subtable (0, 6)))
return subtable;
1651 if ((subtable = this->
find_subtable (0, 4)))
return subtable;
1654 if ((subtable = this->
find_subtable (3, 1)))
return subtable;
1655 if ((subtable = this->
find_subtable (0, 3)))
return subtable;
1656 if ((subtable = this->
find_subtable (0, 2)))
return subtable;
1657 if ((subtable = this->
find_subtable (0, 1)))
return subtable;
1658 if ((subtable = this->
find_subtable (0, 0)))
return subtable;
1670 this->subtable =
table->find_best_subtable (&symbol);
1678 this->get_glyph_data = subtable;
1680 this->get_glyph_funcZ = get_glyph_from_symbol<CmapSubtable>;
1683 switch (subtable->u.format) {
1686 this->get_glyph_funcZ = get_glyph_from<CmapSubtable>;
1689 this->get_glyph_funcZ = get_glyph_from<CmapSubtableFormat12>;
1693 this->format4_accel.
init (&subtable->u.format4);
1694 this->get_glyph_data = &this->format4_accel;
1706 if (
unlikely (!this->get_glyph_funcZ))
return false;
1707 return this->get_glyph_funcZ (this->get_glyph_data, unicode, glyph);
1711 unsigned int unicode_stride,
1713 unsigned int glyph_stride)
const
1715 if (
unlikely (!this->get_glyph_funcZ))
return 0;
1718 const void *get_glyph_data = this->get_glyph_data;
1722 done <
count && get_glyph_funcZ (get_glyph_data, *first_unicode, first_glyph);
1725 first_unicode = &StructAtOffsetUnaligned<hb_codepoint_t> (first_unicode, unicode_stride);
1726 first_glyph = &StructAtOffsetUnaligned<hb_codepoint_t> (first_glyph, glyph_stride);
1735 switch (this->subtable_uvs->get_glyph_variant (unicode,
1748 { subtable->collect_unicodes (
out, num_glyphs); }
1750 unsigned num_glyphs = UINT_MAX)
const
1751 { subtable->collect_mapping (unicodes,
mapping, num_glyphs); }
1753 { subtable_uvs->collect_variation_selectors (
out); }
1756 { subtable_uvs->collect_variation_unicodes (variation_selector,
out); }
1763 template <
typename Type>
1769 return typed_obj->get_glyph (codepoint, glyph);
1772 template <
typename Type>
1778 if (
likely (typed_obj->get_glyph (codepoint, glyph)))
1781 if (codepoint <= 0x00FFu)
1788 return typed_obj->get_glyph (0xF000u + codepoint, glyph);
1799 const void *get_glyph_data;
1810 unsigned int encoding_id)
const
1813 key.platformID = platform_id;
1814 key.encodingID = encoding_id;
1820 return &(
this+
result.subtable);
1824 unsigned int encoding_id)
const
1827 key.platformID = platform_id;
1828 key.encodingID = encoding_id;
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
constexpr T & operator()(T &v) const
#define TRACE_SERIALIZE(this)
#define TRACE_SANITIZE(this)
#define return_trace(RET)
#define TRACE_SUBSET(this)
void const void *obj HB_UNUSED
#define hb_is_iterator(Iter)
auto it hb_map(hb_second)) template< typename Type > inline hb_array_t< Type > operator()(hb_array_t< Type > array
static auto hb_requires(hb_is_iterable(Iterable))> static inline auto end(Iterable &&iterable) HB_AUTO_RETURN(hb_iter(iterable).end()) namespace OT
#define HB_MAP_VALUE_INVALID
@ HB_SERIALIZE_ERROR_INT_OVERFLOW
DECLARE_NULL_NAMESPACE_BYTES(OT, Index)
@ GLYPH_VARIANT_NOT_FOUND
@ GLYPH_VARIANT_USE_DEFAULT
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro vuzp8 reg2 vuzp d d ®2 endm macro vzip8 reg2 vzip d d ®2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
[3]
QT_BEGIN_NAMESPACE bool done
GLenum GLuint GLenum GLsizei length
GLenum GLsizei GLsizei GLint * values
[16]
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLenum GLsizei count
GLsizei GLsizei GLfloat distance
GLenum GLuint GLintptr offset
GLint GLsizei GLsizei GLenum format
GLenum GLenum GLenum GLenum mapping
GLenum GLenum GLsizei void * table
QTextStream out(stdout)
[7]
Type arrayZ[HB_VAR_ARRAY]
CmapSubtableFormat10 format10
void collect_mapping(hb_set_t *unicodes, hb_map_t *mapping, unsigned num_glyphs=UINT_MAX) const
CmapSubtableFormat0 format0
unsigned get_language() const
bool sanitize(hb_sanitize_context_t *c) const
CmapSubtableFormat4 format4
bool get_glyph(hb_codepoint_t codepoint, hb_codepoint_t *glyph) const
CmapSubtableFormat14 format14
DEFINE_SIZE_UNION(2, format)
void serialize(hb_serialize_context_t *c, Iterator it, unsigned format, const hb_subset_plan_t *plan, const void *base)
CmapSubtableFormat6 format6
union OT::CmapSubtable::@149 u
void collect_unicodes(hb_set_t *out, unsigned int num_glyphs=UINT_MAX) const
CmapSubtableFormat12 format12
CmapSubtableFormat13 format13
bool sanitize(hb_sanitize_context_t *c) const
int cmp(hb_codepoint_t codepoint) const
unsigned get_language() const
void collect_unicodes(hb_set_t *out, unsigned int num_glyphs) const
DEFINE_SIZE_ARRAY(16, groups)
bool sanitize(hb_sanitize_context_t *c) const
void collect_mapping(hb_set_t *unicodes, hb_map_t *mapping, unsigned num_glyphs) const
bool get_glyph(hb_codepoint_t codepoint, hb_codepoint_t *glyph) const
SortedArray32Of< CmapSubtableLongGroup > groups
bool get_glyph(hb_codepoint_t codepoint, hb_codepoint_t *glyph) const
unsigned get_language() const
DEFINE_SIZE_ARRAY(5 *sizeof(UINT), glyphIdArray)
void collect_mapping(hb_set_t *unicodes, hb_map_t *mapping) const
bool sanitize(hb_sanitize_context_t *c) const
void collect_unicodes(hb_set_t *out) const
ArrayOf< HBGlyphID16, UINT > glyphIdArray
DefaultUVS * copy(hb_serialize_context_t *c, const hb_set_t *unicodes) const
DEFINE_SIZE_ARRAY(4, *this)
void collect_unicodes(hb_set_t *out) const
Offset32To< CmapSubtable > subtable
EncodingRecord * copy(hb_serialize_context_t *c, Iterator it, unsigned format, const void *base, const hb_subset_plan_t *plan, unsigned *objidx) const
int cmp(const EncodingRecord &other) const
bool sanitize(hb_sanitize_context_t *c, const void *base) const
static HB_INTERNAL int cmp(const IntType *a, const IntType *b)
void collect_unicodes(hb_set_t *out) const
void collect_mapping(hb_set_t *unicodes, hb_map_t *mapping) const
DEFINE_SIZE_ARRAY(4, *this)
NonDefaultUVS * copy(hb_serialize_context_t *c, const hb_set_t *unicodes, const hb_set_t *glyphs_requested, const hb_map_t *glyph_map) const
void closure_glyphs(const hb_set_t *unicodes, hb_set_t *glyphset) const
hb_sorted_array_t< Type > as_array()
bool sanitize(hb_sanitize_context_t *c) const
int cmp(const hb_codepoint_t &codepoint) const
bool sanitize(hb_sanitize_context_t *c) const
int cmp(const hb_codepoint_t &codepoint) const
HBUINT24 startUnicodeValue
hb_pair_t< unsigned, unsigned > copy(hb_serialize_context_t *c, const hb_set_t *unicodes, const hb_set_t *glyphs_requested, const hb_map_t *glyph_map, const void *base) const
glyph_variant_t get_glyph(hb_codepoint_t codepoint, hb_codepoint_t *glyph, const void *base) const
void operator=(const VariationSelectorRecord &other)
bool sanitize(hb_sanitize_context_t *c, const void *base) const
Offset32To< NonDefaultUVS > nonDefaultUVS
int cmp(const hb_codepoint_t &variation_selector) const
Offset32To< DefaultUVS > defaultUVS
VariationSelectorRecord(const VariationSelectorRecord &other)
void collect_mapping(const void *base, hb_set_t *unicodes, hb_map_t *mapping) const
void collect_unicodes(hb_set_t *out, const void *base) const
unsigned int get_nominal_glyphs(unsigned int count, const hb_codepoint_t *first_unicode, unsigned int unicode_stride, hb_codepoint_t *first_glyph, unsigned int glyph_stride) const
accelerator_t(hb_face_t *face)
bool(* hb_cmap_get_glyph_func_t)(const void *obj, hb_codepoint_t codepoint, hb_codepoint_t *glyph)
void collect_unicodes(hb_set_t *out, unsigned int num_glyphs) const
void collect_variation_selectors(hb_set_t *out) const
void collect_variation_unicodes(hb_codepoint_t variation_selector, hb_set_t *out) const
static HB_INTERNAL bool get_glyph_from_symbol(const void *obj, hb_codepoint_t codepoint, hb_codepoint_t *glyph)
static HB_INTERNAL bool get_glyph_from(const void *obj, hb_codepoint_t codepoint, hb_codepoint_t *glyph)
hb_blob_ptr_t< cmap > table
void collect_mapping(hb_set_t *unicodes, hb_map_t *mapping, unsigned num_glyphs=UINT_MAX) const
bool get_nominal_glyph(hb_codepoint_t unicode, hb_codepoint_t *glyph) const
bool get_variation_glyph(hb_codepoint_t unicode, hb_codepoint_t variation_selector, hb_codepoint_t *glyph) const
cmap_accelerator_t(hb_face_t *face)
const CmapSubtable * find_subtable(unsigned int platform_id, unsigned int encoding_id) const
SortedArray16Of< EncodingRecord > encodingRecord
const CmapSubtable * find_best_subtable(bool *symbol=nullptr) const
bool _can_drop(const EncodingRecord &cmap12, const hb_set_t &cmap12_unicodes, const void *base, Iterator subset_unicodes, EncodingRecordIterator encoding_records)
bool serialize(hb_serialize_context_t *c, Iterator it, EncodingRecIter encodingrec_iter, const void *base, const hb_subset_plan_t *plan, bool drop_format_4=false)
const EncodingRecord * find_encodingrec(unsigned int platform_id, unsigned int encoding_id) const
void closure_glyphs(const hb_set_t *unicodes, hb_set_t *glyphset) const
static constexpr hb_tag_t tableTag
bool find_subtable(unsigned format) const
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_ARRAY(4, encodingRecord)
bool subset(hb_subset_context_t *c) const
unsigned int length() const
bool has(hb_codepoint_t k) const
void add(hb_codepoint_t g)
hb_set_t * glyphs_requested