Crate owned_ttf_parser[−][src]
Extends ttf_parser with owned version of
Font: OwnedFont.
Re-exports ttf_parser::*.
Example
use owned_ttf_parser::{AsFontRef, OwnedFont, Font}; let owned_font = OwnedFont::from_vec(owned_font_data, 0).unwrap(); let font_ref: &Font<'_> = owned_font.as_font(); assert_eq!(font_ref.ascender(), 2254);
Modules
| kern | A kerning table implementation. |
| name_id | A list of name ID’s. |
Structs
| Class | A value of Class Definition Table. |
| Font | A font data handle. |
| GlyphId | A type-safe wrapper for glyph ID. |
| LineMetrics | A line metrics. |
| Name | A Name Record. |
| Names | An iterator over font’s names. |
| OwnedFont | An owned version of |
| RasterGlyphImage | A glyph’s raster image. |
| Rect | A rectangle. |
| ScriptMetrics | A script metrics used by subscript and superscript. |
| Tag | A 4-byte tag. |
| Variation | A font variation value. |
| VariationAxes | An iterator over variation axes. |
| VariationAxis |
Enums
| GlyphClass | A glyph class. |
| PlatformId | A platform ID. |
| RasterImageFormat | A glyph raster image format. |
| TableName | A table name. |
| Weight | A font weight. |
| Width | A font width. |
Traits
| AsFontRef | Used to perform a cheap conversion to a |
| OutlineBuilder | A trait for glyph outline construction. |
Functions
| fonts_in_collection | Returns the number of fonts stored in a TrueType font collection. |