pub enum PDType1Font {
Show 14 variants
Helvetica,
HelveticaBold,
HelveticaOblique,
HelveticaBoldOblique,
TimesRoman,
TimesBold,
TimesItalic,
TimesBoldItalic,
Courier,
CourierBold,
CourierOblique,
CourierBoldOblique,
Symbol,
ZapfDingbats,
}Expand description
Standard 14 built-in Type 1 PDF fonts.
Variants§
Helvetica
HelveticaBold
HelveticaOblique
HelveticaBoldOblique
TimesRoman
TimesBold
TimesItalic
TimesBoldItalic
Courier
CourierBold
CourierOblique
CourierBoldOblique
Symbol
ZapfDingbats
Implementations§
Source§impl PDType1Font
impl PDType1Font
pub fn base_font_name(&self) -> &'static str
Sourcepub fn to_dict(&self) -> COSDictionary
pub fn to_dict(&self) -> COSDictionary
Converts this Type 1 font into a PDF font dictionary.
Sourcepub fn get_char_width(&self, c: char) -> f64
pub fn get_char_width(&self, c: char) -> f64
Approximate or standard character width in 1/1000 font units.
Sourcepub fn get_string_width(&self, text: &str, font_size: f64) -> f64
pub fn get_string_width(&self, text: &str, font_size: f64) -> f64
Computes the exact rendered width of a string in user space points at the given font size.
Trait Implementations§
Source§impl Clone for PDType1Font
impl Clone for PDType1Font
Source§fn clone(&self) -> PDType1Font
fn clone(&self) -> PDType1Font
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PDType1Font
Source§impl Debug for PDType1Font
impl Debug for PDType1Font
impl Eq for PDType1Font
Source§impl PartialEq for PDType1Font
impl PartialEq for PDType1Font
impl StructuralPartialEq for PDType1Font
Auto Trait Implementations§
impl Freeze for PDType1Font
impl RefUnwindSafe for PDType1Font
impl Send for PDType1Font
impl Sync for PDType1Font
impl Unpin for PDType1Font
impl UnsafeUnpin for PDType1Font
impl UnwindSafe for PDType1Font
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