Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
HarfBuzzSubset< T, typename > Struct Template Reference

Static Public Member Functions

static HarfbuzzWrappers::HbFacePtr Make (hb_face_t *face, T input)
 

Detailed Description

template<typename T, typename = void>
struct HarfBuzzSubset< T, typename >

Definition at line 67 of file main.cc.

Member Function Documentation

◆ Make()

template<typename T , typename = void>
static HarfbuzzWrappers::HbFacePtr HarfBuzzSubset< T, typename >::Make ( hb_face_t *  face,
T  input 
)
inlinestatic

Definition at line 69 of file main.cc.

69 {
70 // The prior version of harfbuzz automatically dropped layout tables,
71 // but in the new version they are kept by default. So re-add them to the
72 // drop list to retain the same behaviour.
73 if (!hb_ot_var_has_data(face) || hb_ot_var_get_axis_count(face) == 0) {
74 // we can only drop GSUB/GPOS/GDEF for non variable fonts, they may be
75 // needed for variable fonts (guessing we need to keep all of these, but
76 // in Material Symbols Icon variable fonts if we drop the GSUB table (they
77 // do not have GPOS/DEF) then the Fill=1,Weight=100 variation is rendered
78 // incorrect. (and other variations are probably less noticibly
79 // incorrect))
80 hb_set_add(hb_subset_input_set(input, HB_SUBSET_SETS_DROP_TABLE_TAG),
81 HB_TAG('G', 'S', 'U', 'B'));
82 hb_set_add(hb_subset_input_set(input, HB_SUBSET_SETS_DROP_TABLE_TAG),
83 HB_TAG('G', 'P', 'O', 'S'));
84 hb_set_add(hb_subset_input_set(input, HB_SUBSET_SETS_DROP_TABLE_TAG),
85 HB_TAG('G', 'D', 'E', 'F'));
86 }
87 return HarfbuzzWrappers::HbFacePtr(hb_subset_or_fail(face, input));
88 }
std::unique_ptr< hb_face_t, hb_face_deleter > HbFacePtr
Definition hb_wrappers.h:30

The documentation for this struct was generated from the following file: