pub struct TtFont {}Expand description
a runtime font context (TrueType or CFF outlines)
Fields§
§face_index: u32§data: Vec<u8>§hdr: Hdr§fm: Metrics§serial: u64§kind: u32§flags: u32§nglyphs: u32§upem: u32§tab: [(u32, u32); 25]§names: [Vec<u8>; 5]§cpal: u32§cpaln: u32Implementations§
Source§impl TtFont
impl TtFont
Sourcepub fn open(
data: Vec<u8>,
face: u32,
ol: &mut Outline,
serial: u64,
) -> Result<Box<TtFont>, i32>
pub fn open( data: Vec<u8>, face: u32, ol: &mut Outline, serial: u64, ) -> Result<Box<TtFont>, i32>
ttf_open(data, face): the context, or ERR_*
Sourcepub fn glyph(&self, cp: u32) -> u32
pub fn glyph(&self, cp: u32) -> u32
glyph for cp (0 = .notdef). Symbol fonts ((3,0) cmap) map like GDI: U+0000..U+00FF and the Windows-1252 characters to U+F000 + their code page byte [ttf_glyph]
pub fn has(&self, cp: u32) -> bool
Sourcepub fn kern_table(&self, g1: u32, g2: u32) -> i32
pub fn kern_table(&self, g1: u32, g2: u32) -> i32
sum of the ‘kern’ format 0 values [tt_kern_table]
Sourcepub fn name(&self, which: u32) -> &[u8] ⓘ
pub fn name(&self, which: u32) -> &[u8] ⓘ
font_name of this font (“” for an unknown id) [ttf_name]
Sourcepub fn prep(&self, glyph: u32, ol: &mut Outline) -> bool
pub fn prep(&self, glyph: u32, ol: &mut Outline) -> bool
the outline of glyph into the buffer (owner set either way): true = not empty [ttf_prep]
Auto Trait Implementations§
impl Forget for TtFont
impl Freeze for TtFont
impl RefUnwindSafe for TtFont
impl Send for TtFont
impl Sync for TtFont
impl Unpin for TtFont
impl UnsafeUnpin for TtFont
impl UnwindSafe for TtFont
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