Enum pdf::BuiltinFont
[−]
[src]
pub enum BuiltinFont {
Courier,
Courier_Bold,
Courier_Oblique,
Courier_BoldOblique,
Helvetica,
Helvetica_Bold,
Helvetica_Oblique,
Helvetica_BoldOblique,
Times_Roman,
Times_Bold,
Times_Italic,
Times_BoldItalic,
Symbol,
ZapfDingbats,
}The "Base14" built-in fonts in PDF. Underscores in these names are hyphens in the real names.
Variants
CourierCourier_BoldCourier_ObliqueCourier_BoldObliqueHelveticaHelvetica_BoldHelvetica_ObliqueHelvetica_BoldObliqueTimes_RomanTimes_BoldTimes_ItalicTimes_BoldItalicSymbolZapfDingbatsTrait Implementations
impl Debug for BuiltinFont[src]
impl PartialEq for BuiltinFont[src]
fn eq(&self, __arg_0: &BuiltinFont) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.
impl Eq for BuiltinFont[src]
impl Hash for BuiltinFont[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl Copy for BuiltinFont[src]
impl Clone for BuiltinFont[src]
fn clone(&self) -> BuiltinFont
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl FontSource for BuiltinFont[src]
fn write_object(&self, pdf: &mut Pdf) -> Result<usize>
Write the object(s) for this font to a pdf file. Read more
fn pdf_name(&self) -> String
Get the PDF name of this font. Read more
fn get_encoding(&self) -> Encoding
The encoding is WinAnsiEncoding for all builtin fonts except Symbol, for wich it is SymbolEncoding. TODO: ZapfDingbats should also have a special encoding.
fn get_width(&self, size: f32, text: &str) -> f32
Get the width of a string in this font at given size. Read more
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
fn get_metrics(&self) -> FontMetrics
Get the font metrics for font.