pub struct Flags(pub hb_subset_flags_t);Expand description
Flags for SubsetInput.
These flags can be used to instruct which tables the subsetter should touch, and how.
§Default flags
assert_eq!(
*Flags::default()
.retain_hinting()
.remap_glyph_indices()
.retain_subroutines()
.retain_subroutines()
.remove_legacy_names()
.remove_overlap_simple_flag()
.remove_unrecognized_tables()
.remove_notdef_outline()
.remove_glyph_names()
.recompute_unicode_ranges()
.retain_layout_closure(),
Flags::default()
);Tuple Fields§
§0: hb_subset_flags_tImplementations§
Source§impl Flags
impl Flags
Sourcepub fn remove_hinting(&mut self) -> &mut Self
pub fn remove_hinting(&mut self) -> &mut Self
Instructs subsetter to remove hinting instructions.
Sourcepub fn retain_hinting(&mut self) -> &mut Self
pub fn retain_hinting(&mut self) -> &mut Self
Instructs subsetter to retain hinting instructions.
Sourcepub fn retain_glyph_indices(&mut self) -> &mut Self
pub fn retain_glyph_indices(&mut self) -> &mut Self
Instructs subsetter to glyph indices.
If a glyph gets dropped, its index will still be retained as an empty glyph.
Sourcepub fn remap_glyph_indices(&mut self) -> &mut Self
pub fn remap_glyph_indices(&mut self) -> &mut Self
Instructs subsetter to map old glyph indices to new ones.
Sourcepub fn remove_subroutines(&mut self) -> &mut Self
pub fn remove_subroutines(&mut self) -> &mut Self
Instructs subsetter to remove subroutines from the CFF glyphs.
This has only effect when subsetting a CFF font.
Sourcepub fn retain_subroutines(&mut self) -> &mut Self
pub fn retain_subroutines(&mut self) -> &mut Self
Instructs subsetter to retain subroutines for CFF glyphs.
Sourcepub fn retain_legacy_names(&mut self) -> &mut Self
pub fn retain_legacy_names(&mut self) -> &mut Self
Instructs subsetter to keep non-unicode name records.
Sourcepub fn remove_legacy_names(&mut self) -> &mut Self
pub fn remove_legacy_names(&mut self) -> &mut Self
Instructs subsetter to remove non-unicode name records.
Sourcepub fn set_overlap_simple_flag(&mut self) -> &mut Self
pub fn set_overlap_simple_flag(&mut self) -> &mut Self
Instructs subsetter to set OVERLAP_SIMPLE flag for simple glyphs.
This is not required for OpenType, but may affect rendering in some platforms.
Sourcepub fn remove_overlap_simple_flag(&mut self) -> &mut Self
pub fn remove_overlap_simple_flag(&mut self) -> &mut Self
Instructs subsetter to not emit OVERLAP_SIMPLE flag.
Sourcepub fn retain_unrecognized_tables(&mut self) -> &mut Self
pub fn retain_unrecognized_tables(&mut self) -> &mut Self
Instructs subsetter to keep unrecognized tables.
The subsetter wil just pass them trough without touching them.
Sourcepub fn remove_unrecognized_tables(&mut self) -> &mut Self
pub fn remove_unrecognized_tables(&mut self) -> &mut Self
Instructs subsetter to remove unrecognized tables.
Sourcepub fn retain_notdef_outline(&mut self) -> &mut Self
pub fn retain_notdef_outline(&mut self) -> &mut Self
Instructs subsetter to keep glyph outline for `notdef``.
Sourcepub fn remove_notdef_outline(&mut self) -> &mut Self
pub fn remove_notdef_outline(&mut self) -> &mut Self
Instructs subsetter to remove glyph outline for `notdef``.
Sourcepub fn retain_glyph_names(&mut self) -> &mut Self
pub fn retain_glyph_names(&mut self) -> &mut Self
Instructs subsetter to keep glyph name information.
Sourcepub fn remove_glyph_names(&mut self) -> &mut Self
pub fn remove_glyph_names(&mut self) -> &mut Self
Instructs subsetter to remove glyph name information.
Sourcepub fn recompute_unicode_ranges(&mut self) -> &mut Self
pub fn recompute_unicode_ranges(&mut self) -> &mut Self
Instructs subsetter to recompute unicode ranges in OS/2 table.
Sourcepub fn retain_unicode_ranges(&mut self) -> &mut Self
pub fn retain_unicode_ranges(&mut self) -> &mut Self
Instructs subsetter to keep original unicode ranges in OS/2 table.
Sourcepub fn retain_layout_closure(&mut self) -> &mut Self
pub fn retain_layout_closure(&mut self) -> &mut Self
Instructs subsetter to keep glyphs for all possible combinations of already retained glyphs.
For example, if glyphs corresponding to f and i are retained, then also glyphs corresponding to ff, fi and
ffi are retained.
Sourcepub fn no_layout_closure(&mut self) -> &mut Self
pub fn no_layout_closure(&mut self) -> &mut Self
Instructs subsetter to keep only minimum set of glyphs disregarding layout closure.