pub enum BuiltinFont {
Show 14 variants
Courier,
Courier_Bold,
Courier_Oblique,
Courier_BoldOblique,
Helvetica,
Helvetica_Bold,
Helvetica_Oblique,
Helvetica_BoldOblique,
Times_Roman,
Times_Bold,
Times_Italic,
Times_BoldItalic,
Symbol,
ZapfDingbats,
}
Expand description
The “Base14” built-in fonts in PDF. Underscores in these names are hyphens in the real names.
Variants§
Courier
Courier_Bold
Courier_Oblique
Courier_BoldOblique
Helvetica
Helvetica_Bold
Helvetica_Oblique
Helvetica_BoldOblique
Times_Roman
Times_Bold
Times_Italic
Times_BoldItalic
Symbol
ZapfDingbats
Trait Implementations§
Source§impl Clone for BuiltinFont
impl Clone for BuiltinFont
Source§fn clone(&self) -> BuiltinFont
fn clone(&self) -> BuiltinFont
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 BuiltinFont
impl Debug for BuiltinFont
Source§impl FontSource for BuiltinFont
impl FontSource for BuiltinFont
Source§fn get_encoding(&self) -> &'static Encoding
fn get_encoding(&self) -> &'static Encoding
The encoding is WinAnsiEncoding for all builtin fonts except Symbol, for which it is SymbolEncoding, and ZapfDingbats, which uses ZapfDingbatsEncoding.
Source§fn write_object(&self, pdf: &mut Pdf) -> Result<usize>
fn write_object(&self, pdf: &mut Pdf) -> Result<usize>
Write the object(s) for this font to a pdf file. Read more
Source§fn get_width(&self, size: f32, text: &str) -> f32
fn get_width(&self, size: f32, text: &str) -> f32
Get the width of a string in this font at given size. Read more
Source§fn get_width_raw(&self, text: &str) -> u32
fn get_width_raw(&self, text: &str) -> u32
Get the width of a string in thousands of unit of text space.
This unit is what is used in some places internally in pdf files. Read more
Source§fn get_metrics(&self) -> FontMetrics
fn get_metrics(&self) -> FontMetrics
Get the font metrics for font.
Source§impl Hash for BuiltinFont
impl Hash for BuiltinFont
Source§impl PartialEq for BuiltinFont
impl PartialEq for BuiltinFont
impl Copy for BuiltinFont
impl Eq for BuiltinFont
impl StructuralPartialEq for BuiltinFont
Auto Trait Implementations§
impl Freeze for BuiltinFont
impl RefUnwindSafe for BuiltinFont
impl Send for BuiltinFont
impl Sync for BuiltinFont
impl Unpin for BuiltinFont
impl UnwindSafe for BuiltinFont
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