pub struct Gid(pub u16);Expand description
A glyph index into a font program.
Zero is a legitimate value — it is the .notdef glyph, which PDFium
deliberately distinguishes from “no glyph at all” (that is None, the C++’s
-1). Every ladder in this crate returns Option<Gid> for exactly that
reason.
Whose numbering this is depends on the loaded program: skrifa’s
GlyphId for an sfnt or bare-CFF face, and /CharStrings declaration
order for a Type 1 one. pdfrum_type1::Gid names that second space in
its own crate and stays a separate type; the From impls below are the
conversion, and they live here because this is the one crate that holds
both index spaces.
Tuple Fields§
§0: u16Trait Implementations§
impl Copy for Gid
impl Eq for Gid
Source§impl Ord for Gid
impl Ord for Gid
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Gid
impl PartialOrd for Gid
impl StructuralPartialEq for Gid
Auto Trait Implementations§
impl Freeze for Gid
impl RefUnwindSafe for Gid
impl Send for Gid
impl Sync for Gid
impl Unpin for Gid
impl UnsafeUnpin for Gid
impl UnwindSafe for Gid
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