#[repr(C)]pub struct FontApi {
pub glyphs: Option<unsafe extern "C" fn(font: *const FontT, glyphs: *mut u16, codepoints: *const u32, size: u32)>,
pub metrics: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, glyphs: *const u16, num_glyphs: u32) -> RectT>,
pub metrics_array: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, pos_x: *mut f32, rects: *mut RectT, glyphs: *const u16, num_glyphs: u32) -> RectT>,
pub line: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, line_width: *mut f32, glyphs: *const u16, num_glyphs: u32) -> u32>,
pub rescale_font: Option<unsafe extern "C" fn(font: *mut FontT, scale_factor: f32)>,
pub glyph_set_from_scale: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, new_font_scale: *mut f32) -> u32>,
pub first_glyph_of_set: Option<unsafe extern "C" fn(font: *const FontT, set: u32) -> *const FontGlyphT>,
}
Fields§
§glyphs: Option<unsafe extern "C" fn(font: *const FontT, glyphs: *mut u16, codepoints: *const u32, size: u32)>
§metrics: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, glyphs: *const u16, num_glyphs: u32) -> RectT>
§metrics_array: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, pos_x: *mut f32, rects: *mut RectT, glyphs: *const u16, num_glyphs: u32) -> RectT>
§line: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, line_width: *mut f32, glyphs: *const u16, num_glyphs: u32) -> u32>
§rescale_font: Option<unsafe extern "C" fn(font: *mut FontT, scale_factor: f32)>
§glyph_set_from_scale: Option<unsafe extern "C" fn(font: *const FontT, font_scale: f32, new_font_scale: *mut f32) -> u32>
§first_glyph_of_set: Option<unsafe extern "C" fn(font: *const FontT, set: u32) -> *const FontGlyphT>
Implementations§
Source§impl FontApi
impl FontApi
pub unsafe fn glyphs( &self, font: *const FontT, glyphs: *mut u16, codepoints: *const u32, size: u32, )
pub unsafe fn metrics( &self, font: *const FontT, font_scale: f32, glyphs: *const u16, num_glyphs: u32, ) -> RectT
pub unsafe fn metrics_array( &self, font: *const FontT, font_scale: f32, pos_x: *mut f32, rects: *mut RectT, glyphs: *const u16, num_glyphs: u32, ) -> RectT
pub unsafe fn line( &self, font: *const FontT, font_scale: f32, line_width: *mut f32, glyphs: *const u16, num_glyphs: u32, ) -> u32
pub unsafe fn rescale_font(&self, font: *mut FontT, scale_factor: f32)
pub unsafe fn glyph_set_from_scale( &self, font: *const FontT, font_scale: f32, new_font_scale: *mut f32, ) -> u32
pub unsafe fn first_glyph_of_set( &self, font: *const FontT, set: u32, ) -> *const FontGlyphT
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FontApi
impl RefUnwindSafe for FontApi
impl Send for FontApi
impl Sync for FontApi
impl Unpin for FontApi
impl UnwindSafe for FontApi
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