Function zaplib::get_font_atlas_page_id
source · [−]pub fn get_font_atlas_page_id(
fonts_data: &RwLock<CxFontsData>,
font_id: usize,
dpi_factor: f32,
font_size: f32
) -> (usize, RwLockReadGuard<'_, CxFontsData>)
Expand description
Get the page id for a particular font_id/dpi_factor/font_size combination.
Returns a read lock in addition to the page id, since you typically need to read more stuff out of
fonts_data
, and this avoids you having to get another lock after this.