Struct imgui::Font

source ·
#[repr(C)]
pub struct Font { pub fallback_advance_x: f32, pub font_size: f32, pub config_data_count: i16, pub fallback_char: ImWchar, pub ellipsis_char: ImWchar, pub dot_char: ImWchar, pub dirty_lookup_tables: bool, pub scale: f32, pub ascent: f32, pub descent: f32, pub metrics_total_surface: c_int, pub used_4k_pages_map: [u8; 34], /* private fields */ }
Expand description

Runtime data for a single font within a font atlas

Fields§

§fallback_advance_x: f32§font_size: f32§config_data_count: i16§fallback_char: ImWchar§ellipsis_char: ImWchar§dot_char: ImWchar§dirty_lookup_tables: bool§scale: f32§ascent: f32§descent: f32§metrics_total_surface: c_int§used_4k_pages_map: [u8; 34]

Implementations§

source§

impl Font

source

pub fn id(&self) -> FontId

Returns the identifier of this font

Trait Implementations§

source§

impl RawCast<ImFont> for Font

source§

unsafe fn from_raw(raw: &T) -> &Self

Casts an immutable reference from the raw type Read more
source§

unsafe fn from_raw_mut(raw: &mut T) -> &mut Self

Casts a mutable reference from the raw type Read more
source§

unsafe fn raw(&self) -> &T

Casts an immutable reference to the raw type Read more
source§

unsafe fn raw_mut(&mut self) -> &mut T

Casts a mutable reference to the raw type Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.