pub struct Font {
pub texture: Option<SharedTexture>,
/* private fields */
}Fields§
§texture: Option<SharedTexture>Implementations§
source§impl Font
impl Font
pub fn default_char_set() -> &'static [Range<u32>]
pub fn korean_char_set() -> &'static [Range<u32>]
pub fn chinese_full_char_set() -> &'static [Range<u32>]
pub fn cyrillic_char_set() -> &'static [Range<u32>]
pub fn thai_char_set() -> &'static [Range<u32>]
pub fn vietnamese_char_set() -> &'static [Range<u32>]
pub fn from_memory( data: impl Deref<Target = [u8]>, height: f32, char_set: &[Range<u32>] ) -> Result<Self, &'static str>
pub async fn from_file<P: AsRef<Path>>( path: P, height: f32, char_set: &[Range<u32>] ) -> Result<Self, &'static str>
pub fn glyph(&self, unicode: u32) -> Option<&FontGlyph>
pub fn glyph_index(&self, unicode: u32) -> Option<usize>
pub fn glyphs(&self) -> &[FontGlyph]
pub fn height(&self) -> f32
pub fn ascender(&self) -> f32
pub fn descender(&self) -> f32
pub fn atlas_pixels(&self) -> &[u8] ⓘ
pub fn atlas_size(&self) -> usize
pub fn glyph_advance(&self, c: u32) -> f32
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl !UnwindSafe for Font
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
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere T: 'static,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.