29 #ifndef HB_OT_LAYOUT_COMMON_HH
30 #define HB_OT_LAYOUT_COMMON_HH
39 #ifndef HB_MAX_NESTING_LEVEL
40 #define HB_MAX_NESTING_LEVEL 64
42 #ifndef HB_MAX_CONTEXT_LENGTH
43 #define HB_MAX_CONTEXT_LENGTH 64
45 #ifndef HB_CLOSURE_MAX_STAGES
52 #define HB_CLOSURE_MAX_STAGES 32
55 #ifndef HB_MAX_SCRIPTS
56 #define HB_MAX_SCRIPTS 500
59 #ifndef HB_MAX_LANGSYS
60 #define HB_MAX_LANGSYS 2000
63 #ifndef HB_MAX_LANGSYS_FEATURE_COUNT
64 #define HB_MAX_LANGSYS_FEATURE_COUNT 50000
67 #ifndef HB_MAX_FEATURES
68 #define HB_MAX_FEATURES 750
71 #ifndef HB_MAX_FEATURE_INDICES
72 #define HB_MAX_FEATURE_INDICES 1500
75 #ifndef HB_MAX_LOOKUP_VISIT_COUNT
76 #define HB_MAX_LOOKUP_VISIT_COUNT 35000
83 #define NOT_COVERED ((unsigned int) -1)
86 template<
typename Iterator>
90 template<
typename Iterator>
106 const hb_map_t *duplicate_feature_map_,
107 hb_set_t *new_collected_feature_indexes_)
112 script_count (0),langsys_feature_count (0) {}
119 langsys_feature_count += feature_count;
130 unsigned script_count;
131 unsigned langsys_feature_count;
137 const char *
get_name () {
return "SUBSET_LAYOUT"; }
152 feature_index_count +=
count;
158 lookup_index_count++;
182 feature_index_count (0),
183 lookup_index_count (0)
187 unsigned script_count;
188 unsigned langsys_count;
189 unsigned feature_index_count;
190 unsigned lookup_index_count;
196 template <
typename T>
212 template<
typename OutputArray>
217 const void *base_) : subset_context (subset_context_),
218 out (out_),
base (base_) {}
220 template <
typename T>
223 auto snap = subset_context->serializer->
snapshot ();
224 auto *
o = out.serialize_append (subset_context->serializer);
230 subset_context->serializer->
revert (snap);
242 template<
typename OutputArray,
typename Arg>
248 Arg &&arg_) : subset_context (subset_context_), out (out_),
249 base (base_), arg (arg_) {}
251 template <
typename T>
254 auto snap = subset_context->serializer->
snapshot ();
255 auto *
o = out.serialize_append (subset_context->serializer);
257 bool ret =
o->serialize_subset (subset_context,
offset,
base, arg);
261 subset_context->serializer->
revert (snap);
280 template<
typename OutputArray>
281 subset_offset_array_t<OutputArray>
283 const void *
base)
const
284 {
return subset_offset_array_t<OutputArray> (subset_context,
out,
base); }
287 template<
typename OutputArray,
typename Arg>
288 subset_offset_array_arg_t<OutputArray, Arg>
290 const void *
base, Arg &&
arg)
const
291 {
return subset_offset_array_arg_t<OutputArray, Arg> (subset_context,
out,
base,
arg); }
295 template<
typename OutputArray>
299 const void *base_) : subset_layout_context (c_),
300 out (out_),
base (base_) {}
302 template <
typename T>
324 template<
typename OutputArray>
325 subset_record_array_t<OutputArray>
327 const void *
base)
const
328 {
return subset_record_array_t<OutputArray> (
c,
out,
base); }
333 template<
typename OutputArray>
338 const void *base_) : serialize_context (serialize_context_),
339 out (out_),
base (base_) {}
341 template <
typename T>
360 template<
typename OutputArray>
361 serialize_math_record_array_t<OutputArray>
363 const void *
base)
const
364 {
return serialize_math_record_array_t<OutputArray> (serialize_context,
out,
base); }
385 template <
typename Type>
393 auto *
out =
c->subset_context->serializer->embed (
this);
414 template <
typename Type>
418 {
return (*
this)[
i].offset; }
420 {
return (*
this)[
i].offset; }
422 {
return (*
this)[
i].tag; }
424 unsigned int *record_count ,
429 + this->
sub_array (start_offset, record_count)
431 | hb_sink (
hb_array (record_tags, *record_count))
442 template <
typename Type>
452 auto *
out =
c->serializer->start_embed (*
this);
456 | hb_apply (subset_record_array (
l,
out,
this))
476 auto *
out =
c->serializer->start_embed (*
this);
480 + hb_zip (*
this, hb_range (
count))
481 | hb_filter (
l->feature_index_map, hb_second)
483 | hb_apply (subset_record_array (
l,
out,
this))
496 auto *
out =
c->serializer->start_embed (*
this);
500 for (
auto _ : + hb_zip (*
this, hb_range (
count)))
502 auto snap =
c->serializer->snapshot ();
503 l->cur_script_index =
_.second;
504 bool ret =
_.first.subset (
l,
this);
505 if (!
ret)
c->serializer->revert (snap);
527 template <
typename set_t>
529 {
return glyphs->add_range (
first,
last); }
543 {
return hb_any (*
this, indexes); }
545 template <
typename Iterator,
552 if (
unlikely (!
c->extend_min ((*
this))))
return;
554 for (
const auto _ :
it)
556 if (!
l->visitLookupIndex())
break;
566 unsigned int *_count ,
567 unsigned int *_indexes )
const
572 | hb_sink (
hb_array (_indexes, *_count))
592 unsigned int *feature_count ,
593 unsigned int *feature_indexes )
const
619 | hb_filter (feature_index_map)
620 |
hb_map (feature_index_map)
624 + hb_iter (
o.featureIndex)
625 | hb_filter (feature_index_map)
626 |
hb_map (feature_index_map)
629 for (;
iter && o_iter;
iter++, o_iter++)
632 unsigned b = *o_iter;
633 if (
a !=
b)
return false;
636 if (
iter || o_iter)
return false;
649 | hb_filter (
c->duplicate_feature_map)
650 | hb_sink (
c->new_feature_indexes)
656 const Tag *
tag =
nullptr)
const
659 auto *
out =
c->serializer->start_embed (*
this);
669 | hb_filter (
l->feature_index_map)
670 |
hb_map (
l->feature_index_map)
673 bool ret = bool (
it);
674 out->featureIndex.serialize (
c->serializer,
l,
it);
703 unsigned int *lang_sys_count ,
721 if (!
c->visitScript ())
return;
738 if (
c->visitLangsys (
d.get_feature_count ())) {
739 d.collect_features (
c);
742 for (
auto _ : + hb_zip (
langSys, hb_range (langsys_count)))
745 if (!
c->visitLangsys (
l.get_feature_count ()))
continue;
746 if (
l.compare (
d,
c->duplicate_feature_map))
continue;
748 l.collect_features (
c);
754 for (
auto _ : + hb_zip (
langSys, hb_range (langsys_count)))
757 if (!
c->visitLangsys (
l.get_feature_count ()))
continue;
758 l.collect_features (
c);
771 auto *
out =
c->serializer->start_embed (*
this);
774 bool defaultLang =
false;
777 c->serializer->push ();
782 c->serializer->pop_discard ();
783 out->defaultLangSys = 0;
787 c->serializer->add_link (
out->defaultLangSys,
c->serializer->pop_pack ());
792 const hb_set_t *active_langsys =
l->script_langsys_map->get (
l->cur_script_index);
797 | hb_filter (active_langsys, hb_second)
800 | hb_apply (subset_record_array (
l, &(
out->langSys),
this))
995 | hb_sink (
hb_array (chars, *char_count))
1002 {
return min_size +
characters.len * HBUINT24::static_size; }
1053 #ifdef HB_NO_LAYOUT_FEATURE_PARAMS
1059 if ((
tag & 0xFFFF0000u) ==
HB_TAG (
's',
's',
'\0',
'\0'))
1061 if ((
tag & 0xFFFF0000u) ==
HB_TAG (
'c',
'v',
'\0',
'\0'))
1072 if ((*
tag & 0xFFFF0000u) ==
HB_TAG (
's',
's',
'\0',
'\0'))
1074 if ((*
tag & 0xFFFF0000u) ==
HB_TAG (
'c',
'v',
'\0',
'\0'))
1079 #ifndef HB_NO_LAYOUT_FEATURE_PARAMS
1088 if ((
tag & 0xFFFF0000u) ==
HB_TAG (
's',
's',
'\0',
'\0'))
1089 return u.stylisticSet;
1094 if ((
tag & 0xFFFF0000u) ==
HB_TAG (
'c',
'v',
'\0',
'\0'))
1095 return u.characterVariants;
1117 unsigned int *lookup_count ,
1118 unsigned int *lookup_tags )
const
1131 const Tag *
tag =
nullptr)
const
1134 auto *
out =
c->serializer->start_embed (*
this);
1141 | hb_filter (
l->lookup_index_map)
1142 |
hb_map (
l->lookup_index_map)
1145 out->lookupIndex.serialize (
c->serializer,
l,
it);
1177 closure->tag ==
HB_TAG (
's',
'i',
'z',
'e') &&
1178 closure->list_base && closure->list_base <
this)
1180 unsigned int new_offset_int = orig_offset -
1181 (((
char *)
this) - ((
char *) closure->list_base));
1185 new_offset = new_offset_int;
1186 if (new_offset == new_offset_int &&
1233 template <
typename TSubTable>
1236 template <
typename TSubTable>
1240 template <
typename TSubTable>
1242 {
return this+get_subtables<TSubTable> ()[
i]; }
1243 template <
typename TSubTable>
1245 {
return this+get_subtables<TSubTable> ()[
i]; }
1249 const HBUINT16 &markFilteringSet = StructAfter<const HBUINT16> (subTable);
1251 return (
const char *) &StructAfter<const char> (markFilteringSet) - (
const char *)
this;
1252 return (
const char *) &markFilteringSet - (
const char *)
this;
1262 unsigned int flag = lookupFlag;
1265 const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1266 flag += (markFilteringSet << 16);
1271 template <
typename TSubTable,
typename context_t,
typename ...Ts>
1272 typename context_t::return_t
dispatch (context_t *
c, Ts&&... ds)
const
1274 unsigned int lookup_type =
get_type ();
1277 for (
unsigned int i = 0;
i <
count;
i++) {
1278 typename context_t::return_t
r = get_subtable<TSubTable> (
i).dispatch (
c, lookup_type, std::forward<Ts> (ds)...);
1279 if (
c->stop_sublookup_iteration (
r))
1286 unsigned int lookup_type,
1287 uint32_t lookup_props,
1288 unsigned int num_subtables)
1292 lookupType = lookup_type;
1293 lookupFlag = lookup_props & 0xFFFFu;
1298 HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1299 markFilteringSet = lookup_props >> 16;
1304 template <
typename TSubTable>
1308 auto *
out =
c->serializer->start_embed (*
this);
1310 out->lookupType = lookupType;
1311 out->lookupFlag = lookupFlag;
1313 const hb_set_t *glyphset =
c->plan->glyphset_gsub ();
1314 unsigned int lookup_type =
get_type ();
1315 + hb_iter (get_subtables <TSubTable> ())
1316 | hb_filter ([
this, glyphset, lookup_type] (
const Offset16To<TSubTable> &
_) {
return (
this+
_).intersects (glyphset, lookup_type); })
1317 | hb_apply (subset_offset_array (
c,
out->get_subtables<TSubTable> (),
this, lookup_type))
1323 const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1324 HBUINT16 &outMarkFilteringSet = StructAfter<HBUINT16> (
out->subTable);
1325 outMarkFilteringSet = markFilteringSet;
1331 template <
typename TSubTable>
1335 if (!(
c->check_struct (
this) && subTable.sanitize (
c)))
return_trace (
false);
1342 const HBUINT16 &markFilteringSet = StructAfter<HBUINT16> (subTable);
1349 if (
unlikely (
get_type () == TSubTable::Extension && subtables && !
c->get_edit_count ()))
1361 unsigned int type = get_subtable<TSubTable> (0).u.extension.get_type ();
1362 for (
unsigned int i = 1;
i < subtables;
i++)
1363 if (get_subtable<TSubTable> (
i).
u.extension.get_type () !=
type)
1383 template <
typename TLookup>
1390 auto *
out =
c->serializer->start_embed (
this);
1394 + hb_zip (*
this, hb_range (
count))
1395 | hb_filter (
l->lookup_index_map, hb_second)
1397 | hb_apply (subset_offset_array (
c, *
out,
this))
1426 template <
typename Iterator,
1440 bool intersects (
const hb_set_t *glyphs)
const
1444 if (glyphs->
has (
g))
1448 bool intersects_coverage (
const hb_set_t *glyphs,
unsigned int index)
const
1451 void intersected_coverage_glyphs (
const hb_set_t *glyphs,
hb_set_t *intersect_glyphs)
const
1454 for (
unsigned i = 0;
i <
count;
i++)
1459 template <
typename set_t>
1460 bool collect_coverage (set_t *glyphs)
const
1461 {
return glyphs->add_sorted_array (
glyphArray.as_array ()); }
1469 bool more ()
const {
return i <
c->glyphArray.len; }
1473 {
return i !=
o.i ||
c !=
o.c; }
1498 ? (
unsigned int)
range.value + (glyph_id -
range.first)
1502 template <
typename Iterator,
1517 unsigned num_ranges = 0;
1519 for (
auto g: glyphs)
1529 unsigned range = (unsigned) -1;
1531 for (
auto g: glyphs)
1553 bool intersects (
const hb_set_t *glyphs)
const
1558 if (
range.intersects (glyphs))
1562 bool intersects_coverage (
const hb_set_t *glyphs,
unsigned int index)
const
1569 range.intersects (glyphs))
1577 void intersected_coverage_glyphs (
const hb_set_t *glyphs,
hb_set_t *intersect_glyphs)
const
1581 if (!
range.intersects (glyphs))
continue;
1583 if (glyphs->
has (
g)) intersect_glyphs->
add (
g);
1587 template <
typename set_t>
1588 bool collect_coverage (set_t *glyphs)
const
1591 for (
unsigned int i = 0;
i <
count;
i++)
1606 j =
c->rangeRecord.len ?
c->rangeRecord[0].first : 0;
1607 if (
unlikely (
c->rangeRecord[0].first >
c->rangeRecord[0].last))
1610 i =
c->rangeRecord.len;
1614 bool more ()
const {
return i <
c->rangeRecord.len; }
1617 if (j >=
c->rangeRecord[
i].last)
1622 unsigned int old = coverage;
1623 j =
c->rangeRecord[
i].first;
1624 coverage =
c->rangeRecord[
i].value;
1625 if (
unlikely (coverage != old + 1))
1631 i =
c->rangeRecord.len;
1642 {
return i !=
o.i || j !=
o.j ||
c !=
o.c; }
1646 unsigned int i, coverage;
1675 case 1:
return u.format1.get_coverage (glyph_id);
1676 case 2:
return u.format2.get_coverage (glyph_id);
1681 template <
typename Iterator,
1689 unsigned num_ranges = 0;
1691 for (
auto g: glyphs)
1698 u.format =
count <= num_ranges * 3 ? 1 : 2;
1711 const hb_set_t &glyphset = *
c->plan->glyphset_gsub ();
1712 const hb_map_t &glyph_map = *
c->plan->glyph_map;
1716 | hb_filter (glyphset)
1717 | hb_map_retains_sorting (glyph_map)
1720 bool ret = bool (
it);
1721 Coverage_serialize (
c->serializer,
it);
1741 case 1:
return u.format1.intersects (glyphs);
1742 case 2:
return u.format2.intersects (glyphs);
1743 default:
return false;
1750 case 1:
return u.format1.intersects_coverage (glyphs,
index);
1751 case 2:
return u.format2.intersects_coverage (glyphs,
index);
1752 default:
return false;
1758 template <
typename set_t>
1763 case 1:
return u.format1.collect_coverage (glyphs);
1764 case 2:
return u.format2.collect_coverage (glyphs);
1765 default:
return false;
1773 case 1:
return u.format1.intersected_coverage_glyphs (glyphs, intersect_glyphs);
1774 case 2:
return u.format2.intersected_coverage_glyphs (glyphs, intersect_glyphs);
1784 memset (
this, 0,
sizeof (*
this));
1788 case 1: u.format1.init (c_.u.format1);
return;
1789 case 2: u.format2.init (c_.u.format2);
return;
1797 case 1:
return u.format1.more ();
1798 case 2:
return u.format2.more ();
1799 default:
return false;
1806 case 1: u.format1.next ();
break;
1807 case 2: u.format2.next ();
break;
1818 case 1:
return u.format1.get_glyph ();
1819 case 2:
return u.format2.get_glyph ();
1825 if (
format !=
o.format)
return true;
1828 case 1:
return u.format1 !=
o.u.format1;
1829 case 2:
return u.format2 !=
o.u.format2;
1830 default:
return false;
1853 template<
typename Iterator>
1863 bool use_class_zero,
1868 ClassDef_serialize (
c, hb_zip (glyphs.
iter (), + glyphs.
iter ()
1869 |
hb_map (gid_klass_map)));
1875 if (!use_class_zero)
1876 klass_map->
set (0, 0);
1878 unsigned idx = klass_map->
has (0) ? 1 : 0;
1879 for (
const unsigned k: klasses.
iter ())
1881 if (klass_map->
has (k))
continue;
1890 unsigned new_klass = klass_map->
get (gid_klass_map[gid]);
1895 c->propagate_error (glyphs, klasses);
1896 ClassDef_serialize (
c,
it);
1913 template<
typename Iterator,
1932 | hb_reduce (hb_max, 0
u);
1933 unsigned glyph_count = glyph_max - glyph_min + 1;
1939 unsigned idx = gid_klass_pair.first - glyph_min;
1947 bool keep_empty_table =
true,
1948 bool use_class_zero =
true,
1949 const Coverage* glyph_filter =
nullptr)
const
1952 const hb_set_t &glyphset = *
c->plan->glyphset_gsub ();
1953 const hb_map_t &glyph_map = *
c->plan->glyph_map;
1963 | hb_filter (glyphset))
1965 if (glyph_filter && !glyph_filter->has(gid))
continue;
1968 if (!klass)
continue;
1970 glyphs.
push (glyph_map[gid]);
1971 gid_org_klass_map.
set (glyph_map[gid], klass);
1972 orig_klasses.
add (klass);
1975 unsigned glyph_count = glyph_filter
1976 ? hb_len (hb_iter (glyphset) | hb_filter (glyph_filter))
1977 : glyphset.get_population ();
1978 use_class_zero = use_class_zero && glyph_count <= gid_org_klass_map.
get_population ();
1979 ClassDef_remap_and_serialize (
c->serializer, gid_org_klass_map,
1980 glyphs, orig_klasses, use_class_zero, klass_map);
1990 template <
typename set_t>
1991 bool collect_coverage (set_t *glyphs)
const
1993 unsigned int start = 0;
1995 for (
unsigned int i = 0;
i <
count;
i++)
2013 template <
typename set_t>
2014 bool collect_class (set_t *glyphs,
unsigned klass)
const
2017 for (
unsigned int i = 0;
i <
count;
i++)
2022 bool intersects (
const hb_set_t *glyphs)
const
2032 bool intersects_class (
const hb_set_t *glyphs, uint16_t klass)
const
2049 for (
unsigned int i = 0;
i <
count;
i++)
2055 void intersected_class_glyphs (
const hb_set_t *glyphs,
unsigned klass,
hb_set_t *intersect_glyphs)
const
2063 intersect_glyphs->
add (
g);
2068 for (
unsigned i = 0;
i <
count;
i++)
2073 void intersected_classes (
const hb_set_t *glyphs,
hb_set_t *intersect_classes)
const
2078 glyphs->
get_max () > end_glyph)
2079 intersect_classes->
add (0);
2084 if (glyphs->
has (
g))
2085 intersect_classes->
add (
_.second);
2108 template<
typename Iterator,
2123 unsigned num_ranges = 1;
2125 unsigned prev_klass = (*it).second;
2127 RangeRecord range_rec;
2128 range_rec.first = prev_gid;
2129 range_rec.last = prev_gid;
2130 range_rec.value = prev_klass;
2132 RangeRecord *
record =
c->copy (range_rec);
2135 for (
const auto gid_klass_pair : + (++
it))
2138 unsigned cur_klass = gid_klass_pair.second;
2140 if (cur_gid != prev_gid + 1 ||
2141 cur_klass != prev_klass)
2147 range_rec.first = cur_gid;
2148 range_rec.last = cur_gid;
2149 range_rec.value = cur_klass;
2154 prev_klass = cur_klass;
2165 bool keep_empty_table =
true,
2166 bool use_class_zero =
true,
2167 const Coverage* glyph_filter =
nullptr)
const
2170 const hb_set_t &glyphset = *
c->plan->glyphset_gsub ();
2171 const hb_map_t &glyph_map = *
c->plan->glyph_map;
2178 for (
unsigned i = 0;
i <
count;
i++)
2181 if (!klass)
continue;
2186 if (!glyphset.
has (
g))
continue;
2187 if (glyph_filter && !glyph_filter->has (
g))
continue;
2188 glyphs.
push (glyph_map[
g]);
2189 gid_org_klass_map.
set (glyph_map[
g], klass);
2190 orig_klasses.
add (klass);
2194 unsigned glyph_count = glyph_filter
2195 ? hb_len (hb_iter (glyphset) | hb_filter (glyph_filter))
2196 : glyphset.get_population ();
2197 use_class_zero = use_class_zero && glyph_count <= gid_org_klass_map.
get_population ();
2198 ClassDef_remap_and_serialize (
c->serializer, gid_org_klass_map,
2199 glyphs, orig_klasses, use_class_zero, klass_map);
2209 template <
typename set_t>
2210 bool collect_coverage (set_t *glyphs)
const
2213 for (
unsigned int i = 0;
i <
count;
i++)
2220 template <
typename set_t>
2221 bool collect_class (set_t *glyphs,
unsigned int klass)
const
2224 for (
unsigned int i = 0;
i <
count;
i++)
2233 bool intersects (
const hb_set_t *glyphs)
const
2237 for (
unsigned int i = 0;
i <
count;
i++)
2240 if (
range.intersects (glyphs) &&
range.value)
2245 bool intersects_class (
const hb_set_t *glyphs, uint16_t klass)
const
2252 for (
unsigned int i = 0;
i <
count;
i++)
2268 for (
unsigned int i = 0;
i <
count;
i++)
2269 if (arr[
i].
value == k && arr[
i].intersects (glyphs))
2274 void intersected_class_glyphs (
const hb_set_t *glyphs,
unsigned klass,
hb_set_t *intersect_glyphs)
const
2280 for (
unsigned int i = 0;
i <
count;
i++)
2286 intersect_glyphs->
add (
g);
2292 intersect_glyphs->
add (
g);
2298 for (
unsigned int i = 0;
i <
count;
i++)
2306 intersect_glyphs->
add (
g);
2315 intersect_glyphs->
add (
g);
2322 void intersected_classes (
const hb_set_t *glyphs,
hb_set_t *intersect_classes)
const
2328 for (
unsigned int i = 0;
i <
count;
i++)
2334 intersect_classes->
add (0);
2340 intersect_classes->
add (0);
2343 if (
record.intersects (glyphs))
2370 case 1:
return u.format1.get_class (glyph_id);
2371 case 2:
return u.format2.get_class (glyph_id);
2376 template<
typename Iterator,
2383 auto it = + it_with_class_zero | hb_filter (hb_second);
2391 unsigned num_glyphs = 0;
2392 unsigned num_ranges = 1;
2394 unsigned prev_klass = (*it).second;
2396 for (
const auto gid_klass_pair :
it)
2399 unsigned cur_klass = gid_klass_pair.second;
2401 if (cur_gid == glyph_min)
continue;
2402 if (cur_gid > glyph_max) glyph_max = cur_gid;
2403 if (cur_gid != prev_gid + 1 ||
2404 cur_klass != prev_klass)
2408 prev_klass = cur_klass;
2411 if (num_glyphs && 1 + (glyph_max - glyph_min + 1) <= num_ranges * 3)
2426 bool keep_empty_table =
true,
2427 bool use_class_zero =
true,
2428 const Coverage* glyph_filter =
nullptr)
const
2432 case 1:
return_trace (
u.format1.subset (
c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
2433 case 2:
return_trace (
u.format2.subset (
c, klass_map, keep_empty_table, use_class_zero, glyph_filter));
2451 template <
typename set_t>
2455 case 1:
return u.format1.collect_coverage (glyphs);
2456 case 2:
return u.format2.collect_coverage (glyphs);
2457 default:
return false;
2463 template <
typename set_t>
2467 case 1:
return u.format1.collect_class (glyphs, klass);
2468 case 2:
return u.format2.collect_class (glyphs, klass);
2469 default:
return false;
2476 case 1:
return u.format1.intersects (glyphs);
2477 case 2:
return u.format2.intersects (glyphs);
2478 default:
return false;
2484 case 1:
return u.format1.intersects_class (glyphs, klass);
2485 case 2:
return u.format2.intersects_class (glyphs, klass);
2486 default:
return false;
2493 case 1:
return u.format1.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
2494 case 2:
return u.format2.intersected_class_glyphs (glyphs, klass, intersect_glyphs);
2502 case 1:
return u.format1.intersected_classes (glyphs, intersect_classes);
2503 case 2:
return u.format2.intersected_classes (glyphs, intersect_classes);
2519 template<
typename Iterator>
2541 if (peak == 0 ||
coord == peak)
2573 const int *
coords,
unsigned int coord_len)
const
2582 for (
unsigned int i = 0;
i <
count;
i++)
2608 unsigned int region_count =
src->regionCount;
2611 unsigned int backward = region_map.
backward (
r);
2646 const int *
coords,
unsigned int coord_count,
2662 for (;
i < scount;
i++)
2665 delta += scalar * *scursor++;
2667 const HBINT8 *bcursor =
reinterpret_cast<const HBINT8 *
> (scursor);
2671 delta += scalar * *bcursor++;
2680 unsigned int num_scalars)
const
2683 for (
unsigned int i = 0;
i <
count;
i++)
2685 for (
unsigned int i =
count;
i < num_scalars;
i++)
2710 unsigned short ri_count =
src->regionIndices.len;
2711 enum delta_size_t { kZero=0, kByte, kShort };
2714 delta_sz.
resize (ri_count);
2715 ri_map.
resize (ri_count);
2716 unsigned int new_short_count = 0;
2718 for (
r = 0;
r < ri_count;
r++)
2720 delta_sz[
r] = kZero;
2723 unsigned int old = inner_map.
backward (
i);
2724 int16_t delta =
src->get_item_delta (old,
r);
2725 if (delta < -128 || 127 < delta)
2727 delta_sz[
r] = kShort;
2731 else if (delta != 0)
2732 delta_sz[
r] = kByte;
2735 unsigned int short_index = 0;
2736 unsigned int byte_index = new_short_count;
2737 unsigned int new_ri_count = 0;
2738 for (
r = 0;
r < ri_count;
r++)
2741 ri_map[
r] = (delta_sz[
r] == kShort)? short_index++ : byte_index++;
2750 for (
r = 0;
r < ri_count;
r++)
2755 unsigned int old = inner_map.
backward (
i);
2756 for (
unsigned int r = 0;
r < ri_count;
r++)
2768 if (region_indices.
has (region))
continue;
2772 region_indices.
add (region);
2790 return ((
const HBINT16 *)
p)[region];
2816 float get_delta (
unsigned int outer,
unsigned int inner,
2817 const int *
coords,
unsigned int coord_count)
const
2826 return (
this+
dataSets[outer]).get_delta (inner,
2833 const int *
coords,
unsigned int coord_count)
const
2835 unsigned int outer =
index >> 16;
2836 unsigned int inner =
index & 0xFFFF;
2837 return get_delta (outer, inner,
coords, coord_count);
2860 unsigned int set_count = 0;
2861 for (
unsigned int i = 0;
i < inner_maps.
length;
i++)
2862 if (inner_maps[
i].get_population ())
2867 const auto &src_regions =
src+
src->regions;
2870 for (
unsigned int i = 0;
i < inner_maps.
length;
i++)
2871 (
src+
src->dataSets[
i]).collect_region_refs (region_indices, inner_maps[
i]);
2880 + hb_iter (region_indices)
2881 | hb_apply ([®ion_map] (
unsigned _) { region_map.
add(
_); })
2894 unsigned int set_index = 0;
2895 for (
unsigned int i = 0;
i < inner_maps.
length;
i++)
2897 if (!inner_maps[
i].get_population ())
continue;
2899 .serialize_serialize (
c, &(
src+
src->dataSets[
i]), inner_maps[
i], region_map)))
2913 const hb_set_t *variation_indices =
c->plan->layout_variation_indices;
2919 for (
unsigned idx :
c->plan->layout_variation_indices->iter ())
2921 uint16_t major =
idx >> 16;
2922 uint16_t minor =
idx & 0xFFFF;
2924 if (major >= inner_maps.
length)
2926 inner_maps[major].add (minor);
2931 !
c->serializer->in_error()
2936 {
return (
this+
dataSets[major]).get_region_index_count (); }
2939 const int *
coords,
unsigned int coord_count,
2941 unsigned int num_scalars)
const
2944 for (
unsigned i = 0;
i < num_scalars;
i++)
2951 &scalars[0], num_scalars);
2975 auto *
out =
c->serializer->embed (
this);
2981 bool evaluate (
const int *
coords,
unsigned int coord_len)
const
3007 case 1:
return u.format1.evaluate (
coords, coord_len);
3008 default:
return false;
3012 template <
typename context_t,
typename ...Ts>
3013 typename context_t::return_t
dispatch (context_t *
c, Ts&&... ds)
const
3018 case 1:
return_trace (
c->dispatch (
u.format1, std::forward<Ts> (ds)...));
3047 for (
unsigned int i = 0;
i <
count;
i++)
3056 auto *
out =
c->serializer->start_embed (
this);
3060 | hb_apply (subset_offset_array (
c,
out->conditions,
this))
3084 return (
base+
feature).add_lookup_indexes_to (lookup_indexes);
3091 if ((
base+
feature).intersects_lookup_indexes (lookup_indexes))
3104 auto *
out =
c->subset_context->serializer->embed (
this);
3130 for (
unsigned int i = 0;
i <
count;
i++)
3133 if (
record.featureIndex == feature_index)
3134 return &(
this+
record.feature);
3145 {
r.collect_lookups (
this, lookup_indexes); })
3153 record.closure_features (
this, lookup_indexes, feature_indexes);
3160 if (feature_index_map->
has (
record.featureIndex))
return true;
3169 auto *
out =
c->serializer->start_embed (*
this);
3176 | hb_apply (subset_record_array (
l, &(
out->substitutions),
this))
3224 auto *
out =
c->subset_context->serializer->embed (
this);
3254 unsigned int *
index)
const
3257 for (
unsigned int i = 0;
i <
count;
i++)
3260 if ((
this+
record.conditions).evaluate (
coords, coord_len))
3271 unsigned int feature_index)
const
3274 return (
this+
record.substitutions).find_substitute (feature_index);
3287 r.collect_lookups (
this, feature_indexes, lookup_indexes);
3294 record.closure_features (
this, lookup_indexes, feature_indexes);
3301 auto *
out =
c->serializer->start_embed (*
this);
3307 int keep_up_to = -1;
3309 if (
varRecords[
i].intersects_features (
this,
l->feature_index_map)) {
3315 unsigned count = (unsigned) (keep_up_to + 1);
3316 for (
unsigned i = 0;
i <
count;
i++) {
3350 {
return get_delta (
font->x_ppem,
font->x_scale); }
3353 {
return get_delta (
font->y_ppem,
font->y_scale); }
3378 int get_delta (
unsigned int ppem,
int scale)
const
3380 if (!ppem)
return 0;
3382 int pixels = get_delta_pixels (ppem);
3388 int get_delta_pixels (
unsigned int ppem_size)
const
3394 if (ppem_size < startSize || ppem_size >
endSize)
3400 unsigned int bits = (
byte >> (16 - (((
s & ((1 << (4 -
f)) - 1)) + 1) <<
f)));
3401 unsigned int mask = (0xFFFFu >> (16 - (1 <<
f)));
3405 if ((
unsigned int) delta >= ((
mask + 1) >> 1))
3432 {
return font->em_scalef_x (get_delta (
font, store)); }
3435 {
return font->em_scalef_y (get_delta (
font, store)); }
3440 auto snap =
c->snapshot ();
3441 auto *
out =
c->embed (
this);
3446 if (!layout_variation_idx_map->
has (
varIdx))
3451 unsigned new_idx = layout_variation_idx_map->
get (
varIdx);
3452 out->varIdx = new_idx;
3456 void record_variation_index (
hb_set_t *layout_variation_indices)
const
3469 float get_delta (
hb_font_t *
font,
const VariationStore &store)
const
3498 #ifndef HB_NO_HINTING
3499 case 1:
case 2:
case 3:
3500 return u.hinting.get_x_delta (
font);
3504 return u.variation.get_x_delta (
font, store);
3514 case 1:
case 2:
case 3:
3515 #ifndef HB_NO_HINTING
3516 return u.hinting.get_y_delta (
font);
3520 return u.variation.get_y_delta (
font, store);
3531 switch (
u.b.format) {
3532 #ifndef HB_NO_HINTING
3533 case 1:
case 2:
case 3:
3548 switch (
u.b.format) {
3549 #ifndef HB_NO_HINTING
3566 switch (
u.b.format) {
3567 #ifndef HB_NO_HINTING
3575 u.variation.record_variation_index (layout_variation_indices);
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
hb_array_t< T > hb_array(T *array, unsigned int length)
#define TRACE_SERIALIZE(this)
#define TRACE_SANITIZE(this)
#define TRACE_DISPATCH(this, format)
#define return_trace(RET)
#define TRACE_SUBSET(this)
#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
#define hb_is_sorted_source_of(Iter, Item)
static auto hb_requires(hb_is_iterable(Iterable))> static inline auto end(Iterable &&iterable) HB_AUTO_RETURN(hb_iter(iterable).end()) namespace OT
HB_EXTERN hb_tag_t const hb_tag_t unsigned int * script_index
HB_EXTERN unsigned int start_offset
subset_offset_array_t< OutputArray > operator()(hb_subset_context_t *subset_context, OutputArray &out, const void *base) const
#define HB_MAX_FEATURE_INDICES
#define HB_MAX_LOOKUP_VISIT_COUNT
HB_MARK_AS_FLAG_T(OT::LookupFlag::Flags)
#define HB_MAX_LANGSYS_FEATURE_COUNT
hb_set_t * hb_set_create()
void hb_set_destroy(hb_set_t *set)
hb_bool_t hb_set_next(const hb_set_t *set, hb_codepoint_t *codepoint)
DECLARE_NULL_NAMESPACE_BYTES(OT, Index)
RecordListOfScript ScriptList
struct OT::subset_record_array_t HB_FUNCOBJ
IntType< uint16_t > HBUINT16
List16OfOffset16To< Lookup > LookupList
RecordListOf< Feature > FeatureList
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
EGLOutputLayerEXT EGLint EGLAttrib value
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLsizei const GLubyte GLsizei GLenum const void * coords
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum const void * pixels
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLint GLsizei GLsizei GLenum format
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
GLenum GLenum GLsizei void * row
GLenum GLenum GLenum GLenum GLenum scale
GLenum GLenum GLsizei void * table
#define HB_TAG(c1, c2, c3, c4)
#define HB_SET_VALUE_INVALID
QTextStream out(stdout)
[7]
bool sanitize(hb_sanitize_context_t *c, Ts &&... ds) const
hb_array_t< Type > as_array()
hb_array_t< const Type > sub_array(unsigned int start_offset, unsigned int count) const
void intersected_class_glyphs(const hb_set_t *glyphs, unsigned klass, hb_set_t *intersect_glyphs) const
DEFINE_SIZE_UNION(2, format)
bool collect_class(set_t *glyphs, unsigned int klass) const
hb_codepoint_t operator()(hb_codepoint_t k) const
bool subset(hb_subset_context_t *c, hb_map_t *klass_map=nullptr, bool keep_empty_table=true, bool use_class_zero=true, const Coverage *glyph_filter=nullptr) const
bool has(hb_codepoint_t k) const
bool intersects(const hb_set_t *glyphs) const
void intersected_classes(const hb_set_t *glyphs, hb_set_t *intersect_classes) const
bool sanitize(hb_sanitize_context_t *c) const
static constexpr unsigned SENTINEL
bool collect_coverage(set_t *glyphs) const
unsigned int get_class(hb_codepoint_t glyph_id) const
union OT::ClassDef::@166 u
bool intersects_class(const hb_set_t *glyphs, unsigned int klass) const
value_t operator[](hb_codepoint_t k) const
unsigned int get(hb_codepoint_t k) const
bool serialize(hb_serialize_context_t *c, Iterator it_with_class_zero)
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_UNION(2, format)
union OT::Condition::@167 u
context_t::return_t dispatch(context_t *c, Ts &&... ds) const
bool evaluate(const int *coords, unsigned int coord_len) const
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c) const
Array16OfOffset32To< Condition > conditions
DEFINE_SIZE_ARRAY(2, conditions)
bool evaluate(const int *coords, unsigned int coord_len) const
hb_codepoint_t __item_t__
CoverageFormat1::iter_t format1
iter_t(const Coverage &c_=Null(Coverage))
bool operator!=(const iter_t &o) const
CoverageFormat2::iter_t format2
__item_t__ __item__() const
hb_codepoint_t get_glyph() const
static constexpr bool is_sorted_iterator
bool subset(hb_subset_context_t *c) const
value_t operator[](hb_codepoint_t k) const
bool operator()(hb_codepoint_t k) const
bool sanitize(hb_sanitize_context_t *c) const
union OT::Coverage::@164 u
bool intersects(const hb_set_t *glyphs) const
static constexpr unsigned SENTINEL
bool has(hb_codepoint_t k) const
bool collect_coverage(set_t *glyphs) const
DEFINE_SIZE_UNION(2, format)
unsigned int get_coverage(hb_codepoint_t glyph_id) const
unsigned int get(hb_codepoint_t k) const
void intersected_coverage_glyphs(const hb_set_t *glyphs, hb_set_t *intersect_glyphs) const
bool intersects_coverage(const hb_set_t *glyphs, unsigned int index) const
bool serialize(hb_serialize_context_t *c, Iterator glyphs)
hb_position_t get_x_delta(hb_font_t *font, const VariationStore &store=Null(VariationStore)) const
Device * copy(hb_serialize_context_t *c, const hb_map_t *layout_variation_idx_map=nullptr) const
hb_position_t get_y_delta(hb_font_t *font, const VariationStore &store=Null(VariationStore)) const
bool sanitize(hb_sanitize_context_t *c) const
VariationDevice variation
void collect_variation_indices(hb_set_t *layout_variation_indices) const
DEFINE_SIZE_ARRAY_SIZED(4, lookupIndex)
unsigned int get_lookup_indexes(unsigned int start_index, unsigned int *lookup_count, unsigned int *lookup_tags) const
Offset16To< FeatureParams > featureParams
unsigned int get_lookup_count() const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l, const Tag *tag=nullptr) const
const FeatureParams & get_feature_params() const
hb_tag_t get_lookup_index(unsigned int i) const
bool sanitize(hb_sanitize_context_t *c, const Record_sanitize_closure_t *closure=nullptr) const
bool intersects_lookup_indexes(const hb_map_t *lookup_indexes) const
void add_lookup_indexes_to(hb_set_t *lookup_indexes) const
Array16Of< HBUINT24 > characters
bool sanitize(hb_sanitize_context_t *c) const
NameID firstParamUILabelNameID
unsigned get_characters(unsigned start_offset, unsigned *char_count, hb_codepoint_t *chars) const
DEFINE_SIZE_ARRAY(14, characters)
NameID featUITooltipTextNameID
bool subset(hb_subset_context_t *c) const
HBUINT16 numNamedParameters
unsigned get_size() const
const FeatureParamsSize & get_size_params(hb_tag_t tag) const
const FeatureParamsStylisticSet & get_stylistic_set_params(hb_tag_t tag) const
FeatureParamsCharacterVariants characterVariants
FeatureParamsStylisticSet stylisticSet
const FeatureParamsCharacterVariants & get_character_variants_params(hb_tag_t tag) const
bool subset(hb_subset_context_t *c, const Tag *tag) const
bool sanitize(hb_sanitize_context_t *c, hb_tag_t tag) const
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c) const
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c) const
void closure_features(const hb_map_t *lookup_indexes, hb_set_t *feature_indexes) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l) const
DEFINE_SIZE_ARRAY(6, substitutions)
Array16Of< FeatureTableSubstitutionRecord > substitutions
void collect_lookups(const hb_set_t *feature_indexes, hb_set_t *lookup_indexes) const
bool intersects_features(const hb_map_t *feature_index_map) const
bool sanitize(hb_sanitize_context_t *c) const
const Feature * find_substitute(unsigned int feature_index) const
bool sanitize(hb_sanitize_context_t *c, const void *base) const
void closure_features(const void *base, const hb_map_t *lookup_indexes, hb_set_t *feature_indexes) const
bool subset(hb_subset_layout_context_t *c, const void *base) const
void collect_lookups(const void *base, hb_set_t *lookup_indexes) const
Offset32To< Feature > feature
Offset32To< FeatureTableSubstitution > substitutions
bool sanitize(hb_sanitize_context_t *c, const void *base) const
void collect_lookups(const void *base, const hb_set_t *feature_indexes, hb_set_t *lookup_indexes) const
void closure_features(const void *base, const hb_map_t *lookup_indexes, hb_set_t *feature_indexes) const
bool subset(hb_subset_layout_context_t *c, const void *base) const
bool intersects_features(const void *base, const hb_map_t *feature_index_map) const
Offset32To< ConditionSet > conditions
FeatureVariations * copy(hb_serialize_context_t *c) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l) const
bool find_index(const int *coords, unsigned int coord_len, unsigned int *index) const
void closure_features(const hb_map_t *lookup_indexes, hb_set_t *feature_indexes) const
static constexpr unsigned NOT_FOUND_INDEX
void collect_lookups(const hb_set_t *feature_indexes, hb_set_t *lookup_indexes) const
const Feature * find_substitute(unsigned int variations_index, unsigned int feature_index) const
bool sanitize(hb_sanitize_context_t *c) const
DEFINE_SIZE_ARRAY_SIZED(8, varRecords)
Array32Of< FeatureVariationRecord > varRecords
bool sanitize(hb_sanitize_context_t *c) const
UnsizedArrayOf< HBUINT16 > deltaValueZ
bool sanitize(hb_sanitize_context_t *c) const
unsigned int get_size() const
DEFINE_SIZE_ARRAY(6, deltaValueZ)
HintingDevice * copy(hb_serialize_context_t *c) const
void serialize(hb_serialize_context_t *c, hb_subset_layout_context_t *l, Iterator it)
bool intersects(const hb_map_t *indexes) const
void add_indexes_to(hb_set_t *output) const
unsigned int get_indexes(unsigned int start_offset, unsigned int *_count, unsigned int *_indexes) const
static constexpr unsigned NOT_FOUND_INDEX
static HB_INTERNAL int cmp(const IntType *a, const IntType *b)
bool sanitize(hb_sanitize_context_t *c) const
bool compare(const LangSys &o, const hb_map_t *feature_index_map) const
DEFINE_SIZE_ARRAY_SIZED(6, featureIndex)
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l, const Tag *tag=nullptr) const
unsigned int get_feature_indexes(unsigned int start_offset, unsigned int *feature_count, unsigned int *feature_indexes) const
void collect_features(hb_prune_langsys_context_t *c) const
void add_feature_indexes_to(hb_set_t *feature_indexes) const
unsigned int get_feature_count() const
LangSys * copy(hb_serialize_context_t *c) const
hb_tag_t get_feature_index(unsigned int i) const
bool sanitize(hb_sanitize_context_t *c, const Record_sanitize_closure_t *=nullptr) const
unsigned int get_required_feature_index() const
bool has_required_feature() const
bool serialize(hb_serialize_context_t *c, unsigned int lookup_type, uint32_t lookup_props, unsigned int num_subtables)
TSubTable & get_subtable(unsigned int i)
uint32_t get_props() const
bool sanitize(hb_sanitize_context_t *c) const
unsigned int get_type() const
bool subset(hb_subset_context_t *c) const
unsigned int get_size() const
const TSubTable & get_subtable(unsigned int i) const
const Array16OfOffset16To< TSubTable > & get_subtables() const
Array16OfOffset16To< TSubTable > & get_subtables()
context_t::return_t dispatch(context_t *c, Ts &&... ds) const
unsigned int get_subtable_count() const
DEFINE_SIZE_ARRAY(6, subTable)
bool sanitize(hb_sanitize_context_t *c) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l) const
bool intersects(const hb_set_t *glyphs) const
int cmp(hb_codepoint_t g) const
bool collect_coverage(set_t *glyphs) const
bool sanitize(hb_sanitize_context_t *c) const
unsigned int get_tags(unsigned int start_offset, unsigned int *record_count, hb_tag_t *record_tags) const
Offset16To< Type > & get_offset(unsigned int i)
bool find_index(hb_tag_t tag, unsigned int *index) const
const Tag & get_tag(unsigned int i) const
const Offset16To< Type > & get_offset(unsigned int i) const
bool subset(hb_subset_layout_context_t *c, const void *base) const
Offset16To< Type > offset
int cmp(hb_tag_t a) const
bool sanitize(hb_sanitize_context_t *c, const void *base) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l) const
bool sanitize(hb_sanitize_context_t *c) const
const Type & operator[](unsigned int i) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l) const
bool subset(hb_subset_context_t *c, hb_subset_layout_context_t *l, const Tag *tag) const
bool has_default_lang_sys() const
bool find_lang_sys_index(hb_tag_t tag, unsigned int *index) const
const LangSys & get_lang_sys(unsigned int i) const
DEFINE_SIZE_ARRAY_SIZED(4, langSys)
const Tag & get_lang_sys_tag(unsigned int i) const
unsigned int get_lang_sys_tags(unsigned int start_offset, unsigned int *lang_sys_count, hb_tag_t *lang_sys_tags) const
bool sanitize(hb_sanitize_context_t *c, const Record_sanitize_closure_t *=nullptr) const
Offset16To< LangSys > defaultLangSys
const LangSys & get_default_lang_sys() const
void prune_langsys(hb_prune_langsys_context_t *c, unsigned script_index) const
RecordArrayOf< LangSys > langSys
unsigned int get_lang_sys_count() const
bool bfind(const T &x, unsigned int *i=nullptr, hb_not_found_t not_found=HB_NOT_FOUND_DONT_STORE, unsigned int to_store=(unsigned int) -1) const
hb_sorted_array_t< const Type > sub_array(unsigned int start_offset, unsigned int count) const
Array16Of< HBUINT16 > regionIndices
void collect_region_refs(hb_set_t ®ion_indices, const hb_inc_bimap_t &inner_map) const
int16_t get_item_delta(unsigned int item, unsigned int region) const
bool serialize(hb_serialize_context_t *c, const VarData *src, const hb_inc_bimap_t &inner_map, const hb_bimap_t ®ion_map)
void get_region_scalars(const int *coords, unsigned int coord_count, const VarRegionList ®ions, float *scalars, unsigned int num_scalars) const
bool sanitize(hb_sanitize_context_t *c) const
unsigned int get_size() const
DEFINE_SIZE_ARRAY(6, regionIndices)
unsigned int get_row_size() const
HBUINT8 * get_delta_bytes()
float get_delta(unsigned int inner, const int *coords, unsigned int coord_count, const VarRegionList ®ions) const
unsigned int get_region_index_count() const
void set_item_delta(unsigned int item, unsigned int region, int16_t delta)
const HBUINT8 * get_delta_bytes() const
bool sanitize(hb_sanitize_context_t *c) const
float evaluate(int coord) const
DEFINE_SIZE_ARRAY(4, axesZ)
bool serialize(hb_serialize_context_t *c, const VarRegionList *src, const hb_bimap_t ®ion_map)
unsigned int get_size() const
float evaluate(unsigned int region_index, const int *coords, unsigned int coord_len) const
UnsizedArrayOf< VarRegionAxis > axesZ
bool sanitize(hb_sanitize_context_t *c) const
bool serialize(hb_serialize_context_t *c, const VariationStore *src, const hb_array_t< hb_inc_bimap_t > &inner_maps)
float get_delta(unsigned int index, const int *coords, unsigned int coord_count) const
void get_region_scalars(unsigned int major, const int *coords, unsigned int coord_count, float *scalars, unsigned int num_scalars) const
bool sanitize(hb_sanitize_context_t *c) const
unsigned int get_sub_table_count() const
DEFINE_SIZE_ARRAY_SIZED(8, dataSets)
Offset32To< VarRegionList > regions
bool subset(hb_subset_context_t *c) const
Array16OfOffset32To< VarData > dataSets
unsigned int get_region_index_count(unsigned int major) const
const hb_set_t * glyph_set
hb_collect_variation_indices_context_t(hb_set_t *layout_variation_indices_, const hb_set_t *glyph_set_, const hb_map_t *gpos_lookups_)
hb_set_t * layout_variation_indices
const hb_map_t * gpos_lookups
return_t dispatch(const T &obj)
static return_t default_return_value()
hb_hashmap_t< unsigned, hb_set_t * > * script_langsys_map
bool visitLangsys(unsigned feature_count)
hb_prune_langsys_context_t(const void *table_, hb_hashmap_t< unsigned, hb_set_t * > *script_langsys_map_, const hb_map_t *duplicate_feature_map_, hb_set_t *new_collected_feature_indexes_)
hb_set_t * new_feature_indexes
const hb_map_t * duplicate_feature_map
bool visitFeatureIndex(int count)
hb_subset_context_t * subset_context
const hb_map_t * feature_index_map
hb_subset_layout_context_t(hb_subset_context_t *c_, hb_tag_t tag_, hb_map_t *lookup_map_, hb_hashmap_t< unsigned, hb_set_t * > *script_langsys_map_, hb_map_t *feature_index_map_)
static return_t default_return_value()
const hb_map_t * lookup_index_map
unsigned cur_script_index
const hb_hashmap_t< unsigned, hb_set_t * > * script_langsys_map
bool operator()(T &&record)
serialize_math_record_array_t(hb_serialize_context_t *serialize_context_, OutputArray &out_, const void *base_)
subset_offset_array_arg_t(hb_subset_context_t *subset_context_, OutputArray &out_, const void *base_, Arg &&arg_)
bool operator()(T &&offset)
subset_offset_array_t(hb_subset_context_t *subset_context_, OutputArray &out_, const void *base_)
bool operator()(T &&offset)
void operator()(T &&record)
subset_record_array_t(hb_subset_layout_context_t *c_, OutputArray *out_, const void *base_)
hb_codepoint_t backward(hb_codepoint_t rhs) const
unsigned int get_population() const
unsigned int get_population() const
bool set(K key, const V &value)
bool has(K k, V *vp=nullptr) const
hb_codepoint_t add(hb_codepoint_t lhs)
hb_codepoint_t get_next_value() const
void revert(snapshot_t snap)
auto src copy(this, std::forward< Ts >(ds)...)) template< typename Type > auto _copy(const Type &src
void del_range(hb_codepoint_t a, hb_codepoint_t b)
hb_codepoint_t get_max() const
bool has(hb_codepoint_t k) const
bool intersects(hb_codepoint_t first, hb_codepoint_t last) const
static constexpr hb_codepoint_t INVALID
void add_array(const T *array, unsigned int count, unsigned int stride=sizeof(T))
void add(hb_codepoint_t g)
hb_codepoint_t get_min() const
XmlOutput::xml_output tag(const QString &name)