pub struct ShapedGlyph {
pub gid: u16,
pub advance_units: i32,
pub x_offset_units: i32,
pub y_offset_units: i32,
pub cluster: u32,
}Expand description
One glyph in a shaped run. Cluster values are byte offsets into the source UTF-8 string.
Fields§
§gid: u16Glyph ID into the source font. Becomes the CID in the emitted
PDF (we use /CIDToGIDMap /Identity).
advance_units: i32Horizontal advance in font units after OpenType positioning.
x_offset_units: i32Horizontal offset to apply before drawing this glyph, in font units.
y_offset_units: i32Vertical offset to apply before drawing this glyph, in font units.
cluster: u32Byte offset of this glyph’s grapheme cluster in the source string. Monotonically non-decreasing across a LTR run.
Trait Implementations§
Source§impl Clone for ShapedGlyph
impl Clone for ShapedGlyph
Source§fn clone(&self) -> ShapedGlyph
fn clone(&self) -> ShapedGlyph
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 ShapedGlyph
impl Debug for ShapedGlyph
Source§impl PartialEq for ShapedGlyph
impl PartialEq for ShapedGlyph
impl Copy for ShapedGlyph
impl Eq for ShapedGlyph
impl StructuralPartialEq for ShapedGlyph
Auto Trait Implementations§
impl Freeze for ShapedGlyph
impl RefUnwindSafe for ShapedGlyph
impl Send for ShapedGlyph
impl Sync for ShapedGlyph
impl Unpin for ShapedGlyph
impl UnsafeUnpin for ShapedGlyph
impl UnwindSafe for ShapedGlyph
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§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.