Struct pdf_canvas::FontMetrics [−][src]
pub struct FontMetrics { /* fields omitted */ }
Relevant data that can be loaded from an AFM (Adobe Font Metrics) file. A FontMetrics object is specific to a given encoding.
Methods
impl FontMetrics
[src]
impl FontMetrics
pub fn parse(source: File) -> Result<FontMetrics>
[src]
pub fn parse(source: File) -> Result<FontMetrics>
Create a FontMetrics by reading an .afm file.
pub fn get_width(&self, char: u8) -> Option<u16>
[src]
pub fn get_width(&self, char: u8) -> Option<u16>
Get the width of a specific character. The character is given in the encoding of the FontMetrics object.
Trait Implementations
impl Debug for FontMetrics
[src]
impl Debug for FontMetrics
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for FontMetrics
[src]
impl Hash for FontMetrics
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for FontMetrics
[src]
impl PartialEq for FontMetrics
fn eq(&self, other: &FontMetrics) -> bool
[src]
fn eq(&self, other: &FontMetrics) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &FontMetrics) -> bool
[src]
fn ne(&self, other: &FontMetrics) -> bool
This method tests for !=
.
impl Eq for FontMetrics
[src]
impl Eq for FontMetrics
impl Clone for FontMetrics
[src]
impl Clone for FontMetrics
fn clone(&self) -> FontMetrics
[src]
fn clone(&self) -> FontMetrics
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for FontMetrics
impl Send for FontMetrics
impl Sync for FontMetrics
impl Sync for FontMetrics