pub struct FontsImpl {
max_texture_side: usize,
definitions: FontDefinitions,
atlas: TextureAtlas,
fonts_by_id: IntMap<FontFaceKey, FontImpl>,
fonts_by_name: HashMap<String, FontFaceKey>,
family_cache: HashMap<FontFamily, CachedFamily>,
}Expand description
The collection of fonts used by epaint.
Required in order to paint text.
Fields§
§max_texture_side: usize§definitions: FontDefinitions§atlas: TextureAtlas§fonts_by_id: IntMap<FontFaceKey, FontImpl>§fonts_by_name: HashMap<String, FontFaceKey>§family_cache: HashMap<FontFamily, CachedFamily>Implementations§
Source§impl FontsImpl
impl FontsImpl
Sourcepub fn new(
max_texture_side: usize,
text_alpha_from_coverage: AlphaFromCoverage,
definitions: FontDefinitions,
) -> Self
pub fn new( max_texture_side: usize, text_alpha_from_coverage: AlphaFromCoverage, definitions: FontDefinitions, ) -> Self
Sourcepub fn font(&mut self, family: &FontFamily) -> Font<'_>
pub fn font(&mut self, family: &FontFamily) -> Font<'_>
Get the right font implementation from FontFamily.
Auto Trait Implementations§
impl Freeze for FontsImpl
impl !RefUnwindSafe for FontsImpl
impl Send for FontsImpl
impl Sync for FontsImpl
impl Unpin for FontsImpl
impl !UnwindSafe for FontsImpl
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