QtBase  v6.3.1
hb-subset-plan.cc
Go to the documentation of this file.
1 /*
2  * Copyright © 2018 Google, Inc.
3  *
4  * This is part of HarfBuzz, a text shaping library.
5  *
6  * Permission is hereby granted, without written agreement and without
7  * license or royalty fees, to use, copy, modify, and distribute this
8  * software and its documentation for any purpose, provided that the
9  * above copyright notice and the following two paragraphs appear in
10  * all copies of this software.
11  *
12  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
16  * DAMAGE.
17  *
18  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
23  *
24  * Google Author(s): Garret Rieger, Roderick Sheeter
25  */
26 
27 #include "hb-subset-plan.hh"
28 #include "hb-map.hh"
29 #include "hb-set.hh"
30 
31 #include "hb-ot-cmap-table.hh"
32 #include "hb-ot-glyf-table.hh"
36 #include "hb-ot-cff1-table.hh"
39 #include "hb-ot-var-fvar-table.hh"
40 #include "hb-ot-stat-table.hh"
41 #include "hb-ot-math-table.hh"
42 
44 
45 
47 #ifndef HB_NO_SUBSET_CFF
48 static inline void
49 _add_cff_seac_components (const OT::cff1::accelerator_t &cff,
50  hb_codepoint_t gid,
51  hb_set_t *gids_to_retain)
52 {
53  hb_codepoint_t base_gid, accent_gid;
54  if (cff.get_seac_components (gid, &base_gid, &accent_gid))
55  {
56  gids_to_retain->add (base_gid);
57  gids_to_retain->add (accent_gid);
58  }
59 }
60 #endif
61 
62 static void
63 _remap_palette_indexes (const hb_set_t *palette_indexes,
64  hb_map_t *mapping /* OUT */)
65 {
66  unsigned new_idx = 0;
67  for (unsigned palette_index : palette_indexes->iter ())
68  {
69  if (palette_index == 0xFFFF)
70  {
71  mapping->set (palette_index, palette_index);
72  continue;
73  }
74  mapping->set (palette_index, new_idx);
75  new_idx++;
76  }
77 }
78 
79 static void
80 _remap_indexes (const hb_set_t *indexes,
81  hb_map_t *mapping /* OUT */)
82 {
83  unsigned count = indexes->get_population ();
84 
85  for (auto _ : + hb_zip (indexes->iter (), hb_range (count)))
86  mapping->set (_.first, _.second);
87 
88 }
89 
90 #ifndef HB_NO_SUBSET_LAYOUT
91 typedef void (*layout_collect_func_t) (hb_face_t *face, hb_tag_t table_tag, const hb_tag_t *scripts, const hb_tag_t *languages, const hb_tag_t *features, hb_set_t *lookup_indexes /* OUT */);
92 
93 
94 template <typename T>
95 static void _collect_layout_indices (hb_face_t *face,
96  const T& table,
97  const hb_set_t *layout_features_to_retain,
98  layout_collect_func_t layout_collect_func,
99  hb_set_t *indices /* OUT */)
100 {
101  hb_vector_t<hb_tag_t> features;
102  if (!features.alloc (table.get_feature_count () + 1))
103  return;
104 
105  hb_set_t visited_features;
106  bool retain_all_features = true;
107  for (unsigned i = 0; i < table.get_feature_count (); i++)
108  {
109  hb_tag_t tag = table.get_feature_tag (i);
110  if (!tag) continue;
111  if (!layout_features_to_retain->has (tag))
112  {
113  retain_all_features = false;
114  continue;
115  }
116 
117  if (visited_features.has (tag))
118  continue;
119 
120  features.push (tag);
121  visited_features.add (tag);
122  }
123 
124  if (!features)
125  return;
126 
127  // The collect function needs a null element to signal end of the array.
128  features.push (0);
129 
130  if (retain_all_features)
131  {
132  // Looking for all features, trigger the faster collection method.
133  layout_collect_func (face,
134  T::tableTag,
135  nullptr,
136  nullptr,
137  nullptr,
138  indices);
139  return;
140  }
141 
142  layout_collect_func (face,
143  T::tableTag,
144  nullptr,
145  nullptr,
146  features.arrayZ,
147  indices);
148 }
149 
150 template <typename T>
151 static inline void
152 _closure_glyphs_lookups_features (hb_face_t *face,
153  hb_set_t *gids_to_retain,
154  const hb_set_t *layout_features_to_retain,
155  hb_map_t *lookups,
156  hb_map_t *features,
157  script_langsys_map *langsys_map)
158 {
159  hb_blob_ptr_t<T> table = hb_sanitize_context_t ().reference_table<T> (face);
160  hb_tag_t table_tag = table->tableTag;
161  hb_set_t lookup_indices;
162  _collect_layout_indices<T> (face,
163  *table,
164  layout_features_to_retain,
166  &lookup_indices);
167 
168  if (table_tag == HB_OT_TAG_GSUB)
170  &lookup_indices,
171  gids_to_retain);
172  table->closure_lookups (face,
173  gids_to_retain,
174  &lookup_indices);
175  _remap_indexes (&lookup_indices, lookups);
176 
177  // Collect and prune features
178  hb_set_t feature_indices;
179  _collect_layout_indices<T> (face,
180  *table,
181  layout_features_to_retain,
183  &feature_indices);
184 
185  table->prune_features (lookups, &feature_indices);
186  hb_map_t duplicate_feature_map;
187  table->find_duplicate_features (lookups, &feature_indices, &duplicate_feature_map);
188 
189  feature_indices.clear ();
190  table->prune_langsys (&duplicate_feature_map, langsys_map, &feature_indices);
191  _remap_indexes (&feature_indices, features);
192 
193  table.destroy ();
194 }
195 
196 #endif
197 
198 #ifndef HB_NO_VAR
199 static inline void
200  _collect_layout_variation_indices (hb_face_t *face,
201  const hb_set_t *glyphset,
202  const hb_map_t *gpos_lookups,
203  hb_set_t *layout_variation_indices,
204  hb_map_t *layout_variation_idx_map)
205 {
206  hb_blob_ptr_t<OT::GDEF> gdef = hb_sanitize_context_t ().reference_table<OT::GDEF> (face);
207  hb_blob_ptr_t<OT::GPOS> gpos = hb_sanitize_context_t ().reference_table<OT::GPOS> (face);
208 
209  if (!gdef->has_data ())
210  {
211  gdef.destroy ();
212  gpos.destroy ();
213  return;
214  }
215  OT::hb_collect_variation_indices_context_t c (layout_variation_indices, glyphset, gpos_lookups);
216  gdef->collect_variation_indices (&c);
217 
219  gpos->collect_variation_indices (&c);
220 
221  gdef->remap_layout_variation_indices (layout_variation_indices, layout_variation_idx_map);
222 
223  gdef.destroy ();
224  gpos.destroy ();
225 }
226 #endif
227 
228 static inline void
229 _cmap_closure (hb_face_t *face,
230  const hb_set_t *unicodes,
231  hb_set_t *glyphset)
232 {
234  cmap.table->closure_glyphs (unicodes, glyphset);
235 }
236 
237 static void _colr_closure (hb_face_t *face,
238  hb_map_t *layers_map,
239  hb_map_t *palettes_map,
240  hb_set_t *glyphs_colred)
241 {
243  if (!colr.is_valid ()) return;
244 
245  unsigned iteration_count = 0;
246  hb_set_t palette_indices, layer_indices;
247  unsigned glyphs_num;
248  {
249  glyphs_num = glyphs_colred->get_population ();
250  // Collect all glyphs referenced by COLRv0
251  hb_set_t glyphset_colrv0;
252  for (hb_codepoint_t gid : glyphs_colred->iter ())
253  colr.closure_glyphs (gid, &glyphset_colrv0);
254 
255  glyphs_colred->union_ (glyphset_colrv0);
256 
257  //closure for COLRv1
258  colr.closure_forV1 (glyphs_colred, &layer_indices, &palette_indices);
259  } while (iteration_count++ <= HB_CLOSURE_MAX_STAGES &&
260  glyphs_num != glyphs_colred->get_population ());
261 
262  colr.closure_V0palette_indices (glyphs_colred, &palette_indices);
263  _remap_indexes (&layer_indices, layers_map);
264  _remap_palette_indexes (&palette_indices, palettes_map);
265 }
266 
267 static inline void
268 _math_closure (hb_face_t *face,
269  hb_set_t *glyphset)
270 {
271  hb_blob_ptr_t<OT::MATH> math = hb_sanitize_context_t ().reference_table<OT::MATH> (face);
272  if (math->has_data ())
273  math->closure_glyphs (glyphset);
274  math.destroy ();
275 }
276 
277 
278 static inline void
279 _remove_invalid_gids (hb_set_t *glyphs,
280  unsigned int num_glyphs)
281 {
283  while (glyphs->next (&gid))
284  {
285  if (gid >= num_glyphs)
286  glyphs->del (gid);
287  }
288 }
289 
290 static void
291 _populate_unicodes_to_retain (const hb_set_t *unicodes,
292  const hb_set_t *glyphs,
293  hb_subset_plan_t *plan)
294 {
295  OT::cmap::accelerator_t cmap (plan->source);
296 
297  constexpr static const int size_threshold = 4096;
298 
299  if (glyphs->is_empty () && unicodes->get_population () < size_threshold)
300  {
301  /* This is the fast path if it's anticipated that size of unicodes
302  * is << than the number of codepoints in the font. */
303  for (hb_codepoint_t cp : *unicodes)
304  {
305  hb_codepoint_t gid;
306  if (!cmap.get_nominal_glyph (cp, &gid))
307  {
308  DEBUG_MSG(SUBSET, nullptr, "Drop U+%04X; no gid", cp);
309  continue;
310  }
311 
312  plan->codepoint_to_glyph->set (cp, gid);
313  }
314  }
315  else
316  {
317  hb_map_t unicode_glyphid_map;
318  cmap.collect_mapping (hb_set_get_empty (), &unicode_glyphid_map);
319 
321  + unicode_glyphid_map.iter ())
322  {
323  if (!unicodes->has (cp_gid.first) && !glyphs->has (cp_gid.second))
324  continue;
325 
326  plan->codepoint_to_glyph->set (cp_gid.first, cp_gid.second);
327  }
328 
329  /* Add gids which where requested, but not mapped in cmap */
330  // TODO(garretrieger):
331  // Once https://github.com/harfbuzz/harfbuzz/issues/3169
332  // is implemented, this can be done with union and del_range
333  for (hb_codepoint_t gid : glyphs->iter ())
334  {
335  if (gid >= plan->source->get_num_glyphs ())
336  break;
337  plan->_glyphset_gsub->add (gid);
338  }
339  }
340 
341  + plan->codepoint_to_glyph->keys () | hb_sink (plan->unicodes);
342  + plan->codepoint_to_glyph->values () | hb_sink (plan->_glyphset_gsub);
343 }
344 
345 static void
346 _populate_gids_to_retain (hb_subset_plan_t* plan,
347  bool close_over_gsub,
348  bool close_over_gpos,
349  bool close_over_gdef)
350 {
351  OT::glyf::accelerator_t glyf (plan->source);
352 #ifndef HB_NO_SUBSET_CFF
354 #endif
355 
356  plan->_glyphset_gsub->add (0); // Not-def
357 
358  _cmap_closure (plan->source, plan->unicodes, plan->_glyphset_gsub);
359 
360 #ifndef HB_NO_SUBSET_LAYOUT
361  if (close_over_gsub)
362  // closure all glyphs/lookups/features needed for GSUB substitutions.
363  _closure_glyphs_lookups_features<GSUB> (
364  plan->source,
365  plan->_glyphset_gsub,
366  plan->layout_features,
367  plan->gsub_lookups,
368  plan->gsub_features,
369  plan->gsub_langsys);
370 
371  if (close_over_gpos)
372  _closure_glyphs_lookups_features<OT::GPOS> (
373  plan->source,
374  plan->_glyphset_gsub,
375  plan->layout_features,
376  plan->gpos_lookups,
377  plan->gpos_features,
378  plan->gpos_langsys);
379 #endif
380  _remove_invalid_gids (plan->_glyphset_gsub, plan->source->get_num_glyphs ());
381 
383  _math_closure (plan->source, plan->_glyphset_mathed);
384  _remove_invalid_gids (plan->_glyphset_mathed, plan->source->get_num_glyphs ());
385 
386  hb_set_t cur_glyphset = *plan->_glyphset_mathed;
387  _colr_closure (plan->source, plan->colrv1_layers, plan->colr_palettes, &cur_glyphset);
388  _remove_invalid_gids (&cur_glyphset, plan->source->get_num_glyphs ());
389 
390  hb_set_set (plan->_glyphset_colred, &cur_glyphset);
391  // Populate a full set of glyphs to retain by adding all referenced
392  // composite glyphs.
393  for (hb_codepoint_t gid : cur_glyphset.iter ())
394  {
395  glyf.add_gid_and_children (gid, plan->_glyphset);
396 #ifndef HB_NO_SUBSET_CFF
397  if (cff.is_valid ())
398  _add_cff_seac_components (cff, gid, plan->_glyphset);
399 #endif
400  }
401 
402  _remove_invalid_gids (plan->_glyphset, plan->source->get_num_glyphs ());
403 
404 
405 #ifndef HB_NO_VAR
406  if (close_over_gdef)
407  _collect_layout_variation_indices (plan->source,
408  plan->_glyphset_gsub,
409  plan->gpos_lookups,
412 #endif
413 }
414 
415 static void
416 _create_old_gid_to_new_gid_map (const hb_face_t *face,
417  bool retain_gids,
418  const hb_set_t *all_gids_to_retain,
419  hb_map_t *glyph_map, /* OUT */
420  hb_map_t *reverse_glyph_map, /* OUT */
421  unsigned int *num_glyphs /* OUT */)
422 {
423  if (!retain_gids)
424  {
425  + hb_enumerate (hb_iter (all_gids_to_retain), (hb_codepoint_t) 0)
426  | hb_sink (reverse_glyph_map)
427  ;
428  *num_glyphs = reverse_glyph_map->get_population ();
429  } else {
430  + hb_iter (all_gids_to_retain)
431  | hb_map ([] (hb_codepoint_t _) {
433  })
434  | hb_sink (reverse_glyph_map)
435  ;
436 
437  unsigned max_glyph =
438  + hb_iter (all_gids_to_retain)
439  | hb_reduce (hb_max, 0u)
440  ;
441  *num_glyphs = max_glyph + 1;
442  }
443 
444  + reverse_glyph_map->iter ()
446  | hb_sink (glyph_map)
447  ;
448 }
449 
450 static void
451 _nameid_closure (hb_face_t *face,
452  hb_set_t *nameids)
453 {
454 #ifndef HB_NO_STYLE
455  face->table.STAT->collect_name_ids (nameids);
456 #endif
457 #ifndef HB_NO_VAR
458  face->table.fvar->collect_name_ids (nameids);
459 #endif
460 }
461 
479  const hb_subset_input_t *input)
480 {
481  hb_subset_plan_t *plan;
482  if (unlikely (!(plan = hb_object_create<hb_subset_plan_t> ())))
483  return nullptr;
484 
485  plan->successful = true;
486  plan->flags = input->flags;
487  plan->unicodes = hb_set_create ();
488  plan->name_ids = hb_set_copy (input->sets.name_ids);
489  _nameid_closure (face, plan->name_ids);
490  plan->name_languages = hb_set_copy (input->sets.name_languages);
491  plan->layout_features = hb_set_copy (input->sets.layout_features);
492  plan->glyphs_requested = hb_set_copy (input->sets.glyphs);
493  plan->drop_tables = hb_set_copy (input->sets.drop_tables);
494  plan->no_subset_tables = hb_set_copy (input->sets.no_subset_tables);
495  plan->source = hb_face_reference (face);
496  plan->dest = hb_face_builder_create ();
497 
498  plan->_glyphset = hb_set_create ();
499  plan->_glyphset_gsub = hb_set_create ();
500  plan->_glyphset_mathed = hb_set_create ();
501  plan->_glyphset_colred = hb_set_create ();
503  plan->glyph_map = hb_map_create ();
504  plan->reverse_glyph_map = hb_map_create ();
505  plan->gsub_lookups = hb_map_create ();
506  plan->gpos_lookups = hb_map_create ();
507 
508  if (plan->check_success (plan->gsub_langsys = hb_object_create<script_langsys_map> ()))
509  plan->gsub_langsys->init_shallow ();
510  if (plan->check_success (plan->gpos_langsys = hb_object_create<script_langsys_map> ()))
511  plan->gpos_langsys->init_shallow ();
512 
513  plan->gsub_features = hb_map_create ();
514  plan->gpos_features = hb_map_create ();
515  plan->colrv1_layers = hb_map_create ();
516  plan->colr_palettes = hb_map_create ();
519 
520  if (unlikely (plan->in_error ())) {
521  hb_subset_plan_destroy (plan);
522  return nullptr;
523  }
524 
525  _populate_unicodes_to_retain (input->sets.unicodes, input->sets.glyphs, plan);
526 
527  _populate_gids_to_retain (plan,
529  !input->sets.drop_tables->has (HB_OT_TAG_GPOS),
530  !input->sets.drop_tables->has (HB_OT_TAG_GDEF));
531 
532  _create_old_gid_to_new_gid_map (face,
534  plan->_glyphset,
535  plan->glyph_map,
536  plan->reverse_glyph_map,
537  &plan->_num_output_glyphs);
538 
539  if (unlikely (plan->in_error ())) {
540  hb_subset_plan_destroy (plan);
541  return nullptr;
542  }
543  return plan;
544 }
545 
555 void
557 {
558  if (!hb_object_destroy (plan)) return;
559 
560  hb_set_destroy (plan->unicodes);
561  hb_set_destroy (plan->name_ids);
565  hb_set_destroy (plan->drop_tables);
567  hb_face_destroy (plan->source);
568  hb_face_destroy (plan->dest);
570  hb_map_destroy (plan->glyph_map);
572  hb_set_destroy (plan->_glyphset);
584 
585  if (plan->gsub_langsys)
586  {
587  for (auto _ : plan->gsub_langsys->iter ())
588  hb_set_destroy (_.second);
589 
590  hb_object_destroy (plan->gsub_langsys);
591  plan->gsub_langsys->fini_shallow ();
592  hb_free (plan->gsub_langsys);
593  }
594 
595  if (plan->gpos_langsys)
596  {
597  for (auto _ : plan->gpos_langsys->iter ())
598  hb_set_destroy (_.second);
599 
600  hb_object_destroy (plan->gpos_langsys);
601  plan->gpos_langsys->fini_shallow ();
602  hb_free (plan->gpos_langsys);
603  }
604 
605  hb_free (plan);
606 }
607 
620 const hb_map_t*
622 {
623  return plan->glyph_map;
624 }
625 
638 const hb_map_t*
640 {
641  return plan->reverse_glyph_map;
642 }
643 
656 const hb_map_t*
658 {
659  return plan->codepoint_to_glyph;
660 }
661 
674 {
675  return hb_object_reference (plan);
676 }
677 
692 hb_bool_t
695  void *data,
697  hb_bool_t replace)
698 {
699  return hb_object_set_user_data (plan, key, data, destroy, replace);
700 }
701 
714 void *
717 {
718  return hb_object_get_user_data (plan, key);
719 }
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p scientific i
[1]
Definition: afcover.h:80
CFF_Font cff
Definition: cffdrivr.c:701
#define DEBUG_MSG(WHAT, OBJ,...)
hb_face_t * hb_face_builder_create()
Definition: hb-face.cc:748
void hb_face_destroy(hb_face_t *face)
Definition: hb-face.cc:287
hb_face_t * hb_face_reference(hb_face_t *face)
Definition: hb-face.cc:271
auto it hb_map(hb_second)) template< typename Type > inline hb_array_t< Type > operator()(hb_array_t< Type > array
hb_map_t * hb_map_create()
Definition: hb-map.cc:52
void hb_map_destroy(hb_map_t *map)
Definition: hb-map.cc:106
HB_EXTERN hb_tag_t table_tag
#define HB_CLOSURE_MAX_STAGES
void hb_ot_layout_collect_features(hb_face_t *face, hb_tag_t table_tag, const hb_tag_t *scripts, const hb_tag_t *languages, const hb_tag_t *features, hb_set_t *feature_indexes)
hb_bool_t hb_ot_layout_has_positioning(hb_face_t *face)
void hb_ot_layout_lookups_substitute_closure(hb_face_t *face, const hb_set_t *lookups, hb_set_t *glyphs)
void hb_ot_layout_collect_lookups(hb_face_t *face, hb_tag_t table_tag, const hb_tag_t *scripts, const hb_tag_t *languages, const hb_tag_t *features, hb_set_t *lookup_indexes)
#define _(S, M)
void hb_set_set(hb_set_t *set, const hb_set_t *other)
Definition: hb-set.cc:389
hb_set_t * hb_set_get_empty()
Definition: hb-set.cc:74
hb_set_t * hb_set_create()
Definition: hb-set.cc:52
void hb_set_destroy(hb_set_t *set)
Definition: hb-set.cc:106
hb_set_t * hb_set_copy(const hb_set_t *set)
Definition: hb-set.cc:186
const hb_map_t * hb_subset_plan_new_to_old_glyph_mapping(const hb_subset_plan_t *plan)
const hb_map_t * hb_subset_plan_old_to_new_glyph_mapping(const hb_subset_plan_t *plan)
hb_subset_plan_t * hb_subset_plan_reference(hb_subset_plan_t *plan)
const hb_map_t * hb_subset_plan_unicode_to_old_glyph_mapping(const hb_subset_plan_t *plan)
hb_subset_plan_t * hb_subset_plan_create_or_fail(hb_face_t *face, const hb_subset_input_t *input)
hb_bool_t hb_subset_plan_set_user_data(hb_subset_plan_t *plan, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace)
void * hb_subset_plan_get_user_data(const hb_subset_plan_t *plan, hb_user_data_key_t *key)
void(* layout_collect_func_t)(hb_face_t *face, hb_tag_t table_tag, const hb_tag_t *scripts, const hb_tag_t *languages, const hb_tag_t *features, hb_set_t *lookup_indexes)
hb_hashmap_t< unsigned, hb_set_t * > script_langsys_map
void hb_subset_plan_destroy(hb_subset_plan_t *plan)
@ HB_SUBSET_FLAGS_RETAIN_GIDS
Definition: hb-subset.h:81
#define unlikely(expr)
Definition: hb.hh:251
#define hb_free
Definition: hb.hh:238
void
Definition: png.h:1080
GLuint64 key
GLenum GLenum GLsizei count
GLenum face
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLenum const void * indices
const GLubyte * c
Definition: qopenglext.h:12701
GLenum GLenum GLenum GLenum mapping
Definition: qopenglext.h:10816
GLenum GLenum GLenum input
Definition: qopenglext.h:10816
GLenum GLenum GLsizei void * table
Definition: qopenglext.h:2745
void(* hb_destroy_func_t)(void *user_data)
Definition: hb-common.h:771
HB_BEGIN_DECLS typedef int hb_bool_t
Definition: hb-common.h:97
uint32_t hb_codepoint_t
Definition: hb-common.h:106
uint32_t hb_tag_t
Definition: hb-common.h:157
HB_EXTERN hb_font_get_glyph_func_t void hb_destroy_func_t destroy
#define HB_OT_TAG_GDEF
Definition: hb-ot-layout.h:52
#define HB_OT_TAG_GPOS
Definition: hb-ot-layout.h:64
#define HB_OT_TAG_GSUB
Definition: hb-ot-layout.h:58
#define HB_SET_VALUE_INVALID
Definition: hb-set.h:46
Definition: main.cpp:38
void destroy()
Definition: hb-blob.hh:91
unsigned int get_num_glyphs() const
Definition: hb-face.hh:94
unsigned int get_population() const
Definition: hb-map.hh:238
auto iter() const HB_AUTO_RETURN(+hb_array(items
bool set(K key, const V &value)
Definition: hb-map.hh:199
void init_shallow()
Definition: hb-map.hh:119
void fini_shallow()
Definition: hb-map.hh:132
bool next(hb_codepoint_t *codepoint) const
Definition: hb-set.hh:136
iter_t iter() const
Definition: hb-set.hh:155
bool has(hb_codepoint_t k) const
Definition: hb-set.hh:111
bool is_empty() const
Definition: hb-set.hh:83
unsigned int get_population() const
Definition: hb-set.hh:145
void union_(const hb_sparseset_t &other)
Definition: hb-set.hh:131
void del(hb_codepoint_t g)
Definition: hb-set.hh:102
void clear()
Definition: hb-set.hh:81
void add(hb_codepoint_t g)
Definition: hb-set.hh:85
bool check_success(bool success)
hb_set_t * unicodes
hb_set_t * layout_variation_indices
hb_set_t * _glyphset
hb_hashmap_t< unsigned, hb_set_t * > * gpos_langsys
hb_set_t * _glyphset_colred
hb_map_t * layout_variation_idx_map
hb_map_t * colr_palettes
hb_set_t * layout_features
hb_map_t * gsub_features
hb_map_t * gpos_lookups
bool in_error() const
hb_map_t * glyph_map
hb_map_t * gsub_lookups
unsigned int _num_output_glyphs
hb_map_t * gpos_features
hb_set_t * drop_tables
hb_map_t * codepoint_to_glyph
hb_hashmap_t< unsigned, hb_set_t * > * gsub_langsys
hb_set_t * _glyphset_gsub
hb_face_t * dest
hb_set_t * name_languages
hb_set_t * no_subset_tables
hb_map_t * colrv1_layers
hb_set_t * name_ids
hb_face_t * source
hb_set_t * glyphs_requested
hb_set_t * _glyphset_mathed
hb_map_t * reverse_glyph_map
Type * push()
Definition: hb-vector.hh:183
Type * arrayZ
Definition: hb-vector.hh:78
bool alloc(unsigned int size)
Definition: hb-vector.hh:292
XmlOutput::xml_output tag(const QString &name)
Definition: xmloutput.h:154