Enum pdf_canvas::BuiltinFont
source · [−]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
sourceimpl Clone for BuiltinFont
impl Clone for BuiltinFont
sourcefn clone(&self) -> BuiltinFont
fn clone(&self) -> BuiltinFont
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BuiltinFont
impl Debug for BuiltinFont
sourceimpl FontSource for BuiltinFont
impl FontSource for BuiltinFont
sourcefn 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.
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn get_metrics(&self) -> FontMetrics
fn get_metrics(&self) -> FontMetrics
Get the font metrics for font.
sourceimpl Hash for BuiltinFont
impl Hash for BuiltinFont
sourceimpl PartialEq<BuiltinFont> for BuiltinFont
impl PartialEq<BuiltinFont> for BuiltinFont
impl Copy for BuiltinFont
impl Eq for BuiltinFont
impl StructuralEq for BuiltinFont
impl StructuralPartialEq for BuiltinFont
Auto Trait Implementations
impl RefUnwindSafe for BuiltinFont
impl Send for BuiltinFont
impl Sync for BuiltinFont
impl Unpin for BuiltinFont
impl UnwindSafe for BuiltinFont
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more