Expand description
A glyph info.
Fields
glyph_id: u32A selected glyph.
Guarantee to be <= u16::MAX.
cluster: u32An original cluster index.
Implementations
sourceimpl GlyphInfo
impl GlyphInfo
sourcepub fn unsafe_to_break(&self) -> bool
pub fn unsafe_to_break(&self) -> bool
Indicates that if input text is broken at the beginning of the cluster this glyph is part of, then both sides need to be re-shaped, as the result might be different.
On the flip side, it means that when this flag is not present, then it’s safe to break the glyph-run at the beginning of this cluster, and the two sides represent the exact same result one would get if breaking input text at the beginning of this cluster and shaping the two sides separately. This can be used to optimize paragraph layout, by avoiding re-shaping of each line after line-breaking, or limiting the reshaping to a small piece around the breaking point only.
Trait Implementations
impl Copy for GlyphInfo
impl Pod for GlyphInfo
Auto Trait Implementations
impl RefUnwindSafe for GlyphInfo
impl Send for GlyphInfo
impl Sync for GlyphInfo
impl Unpin for GlyphInfo
impl UnwindSafe for GlyphInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern. Read more