pub enum FontRef {
Builtin(BuiltinFont),
TrueType(TrueTypeFontId),
}Expand description
Unified font reference: either a builtin PDF font or a loaded TrueType font.
Variants§
Builtin(BuiltinFont)
One of the 14 standard PDF Type1 fonts, guaranteed available in all viewers.
TrueType(TrueTypeFontId)
A TrueType font loaded via crate::PdfDocument::load_font_file or
crate::PdfDocument::load_font_bytes.
Trait Implementations§
Source§impl From<BuiltinFont> for FontRef
impl From<BuiltinFont> for FontRef
Source§fn from(font: BuiltinFont) -> Self
fn from(font: BuiltinFont) -> Self
Converts to this type from the input type.
Source§impl Ord for FontRef
impl Ord for FontRef
Source§impl PartialOrd for FontRef
impl PartialOrd for FontRef
impl Copy for FontRef
impl Eq for FontRef
impl StructuralPartialEq for FontRef
Auto Trait Implementations§
impl Freeze for FontRef
impl RefUnwindSafe for FontRef
impl Send for FontRef
impl Sync for FontRef
impl Unpin for FontRef
impl UnsafeUnpin for FontRef
impl UnwindSafe for FontRef
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