#[repr(C)]pub struct FontLibraryApi {
pub create: Option<unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut FontLibraryT>,
pub destroy: Option<unsafe extern "C" fn(lib: *mut FontLibraryT)>,
pub add_ttf: Option<unsafe extern "C" fn(lib: *mut FontLibraryT, ttf: *const FontDescriptorT) -> TtfHandleT>,
pub lookup: Option<unsafe extern "C" fn(lib: *const FontLibraryT, ttf: TtfHandleT, size: u32, display_dpi: f32) -> *const FontT>,
pub generate: Option<unsafe extern "C" fn(lib: *mut FontLibraryT, tm_res_buf_api: *mut RendererResourceCommandBufferApi, res_buf: *mut RendererResourceCommandBufferO, device_affinity: u32, font_texture_id: u32, ttf: TtfHandleT, size: u32, display_dpi: f32, scales: *const f32, n_scales: u32, texture_handle: *mut RendererHandleT) -> *const FontT>,
}
Fields§
§create: Option<unsafe extern "C" fn(allocator: *mut AllocatorI) -> *mut FontLibraryT>
§destroy: Option<unsafe extern "C" fn(lib: *mut FontLibraryT)>
§add_ttf: Option<unsafe extern "C" fn(lib: *mut FontLibraryT, ttf: *const FontDescriptorT) -> TtfHandleT>
§lookup: Option<unsafe extern "C" fn(lib: *const FontLibraryT, ttf: TtfHandleT, size: u32, display_dpi: f32) -> *const FontT>
§generate: Option<unsafe extern "C" fn(lib: *mut FontLibraryT, tm_res_buf_api: *mut RendererResourceCommandBufferApi, res_buf: *mut RendererResourceCommandBufferO, device_affinity: u32, font_texture_id: u32, ttf: TtfHandleT, size: u32, display_dpi: f32, scales: *const f32, n_scales: u32, texture_handle: *mut RendererHandleT) -> *const FontT>
Implementations§
Source§impl FontLibraryApi
impl FontLibraryApi
pub unsafe fn create(&self, allocator: *mut AllocatorI) -> *mut FontLibraryT
pub unsafe fn destroy(&self, lib: *mut FontLibraryT)
pub unsafe fn add_ttf( &self, lib: *mut FontLibraryT, ttf: *const FontDescriptorT, ) -> TtfHandleT
pub unsafe fn lookup( &self, lib: *const FontLibraryT, ttf: TtfHandleT, size: u32, display_dpi: f32, ) -> *const FontT
pub unsafe fn generate( &self, lib: *mut FontLibraryT, tm_res_buf_api: *mut RendererResourceCommandBufferApi, res_buf: *mut RendererResourceCommandBufferO, device_affinity: u32, font_texture_id: u32, ttf: TtfHandleT, size: u32, display_dpi: f32, scales: *const f32, n_scales: u32, texture_handle: *mut RendererHandleT, ) -> *const FontT
Trait Implementations§
Source§impl Clone for FontLibraryApi
impl Clone for FontLibraryApi
Source§fn clone(&self) -> FontLibraryApi
fn clone(&self) -> FontLibraryApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for FontLibraryApi
impl Default for FontLibraryApi
Source§fn default() -> FontLibraryApi
fn default() -> FontLibraryApi
Returns the “default value” for a type. Read more
impl Copy for FontLibraryApi
Auto Trait Implementations§
impl Freeze for FontLibraryApi
impl RefUnwindSafe for FontLibraryApi
impl Send for FontLibraryApi
impl Sync for FontLibraryApi
impl Unpin for FontLibraryApi
impl UnwindSafe for FontLibraryApi
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