Struct write_fonts::tables::glyf::ComponentFlags
source · pub struct ComponentFlags {
pub round_xy_to_grid: bool,
pub use_my_metrics: bool,
pub scaled_component_offset: bool,
pub unscaled_component_offset: bool,
pub overlap_compound: bool,
}Expand description
Options that can be manually set for a given component.
This provides an easier interface for setting those flags that are not calculated based on other properties of the glyph. For more information on these flags, see Component Glyph Flags in the spec.
These eventually are combined with calculated flags into the
CompositeGlyphFlags bitset.
Fields§
§round_xy_to_grid: boolRound xy values to the nearest grid line
use_my_metrics: boolUse the advance/lsb/rsb values of this component for the whole composite glyph
scaled_component_offset: boolThe composite should have this component’s offset scaled
unscaled_component_offset: boolThe composite should not have this component’s offset scaled
overlap_compound: boolIf set, the components of the composite glyph overlap.
Trait Implementations§
source§impl Clone for ComponentFlags
impl Clone for ComponentFlags
source§fn clone(&self) -> ComponentFlags
fn clone(&self) -> ComponentFlags
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ComponentFlags
impl Debug for ComponentFlags
source§impl Default for ComponentFlags
impl Default for ComponentFlags
source§fn default() -> ComponentFlags
fn default() -> ComponentFlags
Returns the “default value” for a type. Read more
source§impl From<ComponentFlags> for CompositeGlyphFlags
impl From<ComponentFlags> for CompositeGlyphFlags
source§fn from(value: ComponentFlags) -> Self
fn from(value: ComponentFlags) -> Self
Converts to this type from the input type.
source§impl From<CompositeGlyphFlags> for ComponentFlags
impl From<CompositeGlyphFlags> for ComponentFlags
source§fn from(src: CompositeGlyphFlags) -> ComponentFlags
fn from(src: CompositeGlyphFlags) -> ComponentFlags
Converts to this type from the input type.
source§impl Hash for ComponentFlags
impl Hash for ComponentFlags
source§impl PartialEq<ComponentFlags> for ComponentFlags
impl PartialEq<ComponentFlags> for ComponentFlags
source§fn eq(&self, other: &ComponentFlags) -> bool
fn eq(&self, other: &ComponentFlags) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for ComponentFlags
impl Eq for ComponentFlags
impl StructuralEq for ComponentFlags
impl StructuralPartialEq for ComponentFlags
Auto Trait Implementations§
impl RefUnwindSafe for ComponentFlags
impl Send for ComponentFlags
impl Sync for ComponentFlags
impl Unpin for ComponentFlags
impl UnwindSafe for ComponentFlags
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.