#[repr(transparent)]pub struct GlyphStyle(pub(super) u16);Expand description
Defines the script and style associated with a single glyph.
Tuple Fields§
§0: u16Implementations§
Source§impl GlyphStyle
impl GlyphStyle
const STYLE_INDEX_MASK: u16 = 0xFF
const UNASSIGNED: u16 = Self::STYLE_INDEX_MASK
const NON_BASE: u16 = 0x100
const DIGIT: u16 = 0x200
const FROM_GSUB_OUTPUT: u16 = 0x8000
Sourcepub const fn from_raw_parts(
style_index: u16,
is_non_base: bool,
is_digit: bool,
) -> Self
pub const fn from_raw_parts( style_index: u16, is_non_base: bool, is_digit: bool, ) -> Self
Constructs a new glyph style from the given style index and properties.
Sourcepub const fn is_unassigned(self) -> bool
pub const fn is_unassigned(self) -> bool
Returns true if this glyph doesn’t have an assigned style.
Sourcepub const fn is_non_base(self) -> bool
pub const fn is_non_base(self) -> bool
Returns true if this glyph is a non-base (usually a mark).
Sourcepub fn style_class(self) -> Option<&'static StyleClass>
pub fn style_class(self) -> Option<&'static StyleClass>
Returns the associated style class for this glyph.
Sourcepub const fn style_index(self) -> Option<u16>
pub const fn style_index(self) -> Option<u16>
Returns the index of the style class for this class.
fn maybe_assign(&mut self, other: Self)
pub(super) fn set_from_gsub_output(&mut self)
pub(super) fn clear_from_gsub(&mut self)
Sourcepub(super) fn maybe_assign_gsub_output_style(
&mut self,
style: &StyleClass,
) -> bool
pub(super) fn maybe_assign_gsub_output_style( &mut self, style: &StyleClass, ) -> bool
Assign a style if we’ve been marked as GSUB output and the we don’t currently have an assigned style.
This also clears the GSUB output bit.
Returns true if this style was applied.
Trait Implementations§
Source§impl Clone for GlyphStyle
impl Clone for GlyphStyle
Source§fn clone(&self) -> GlyphStyle
fn clone(&self) -> GlyphStyle
Returns a duplicate 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 GlyphStyle
impl Debug for GlyphStyle
Source§impl Default for GlyphStyle
impl Default for GlyphStyle
Source§impl PartialEq for GlyphStyle
impl PartialEq for GlyphStyle
impl Copy for GlyphStyle
impl Eq for GlyphStyle
impl StructuralPartialEq for GlyphStyle
Auto Trait Implementations§
impl Freeze for GlyphStyle
impl RefUnwindSafe for GlyphStyle
impl Send for GlyphStyle
impl Sync for GlyphStyle
impl Unpin for GlyphStyle
impl UnsafeUnpin for GlyphStyle
impl UnwindSafe for GlyphStyle
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