[][src]Struct egui::paint::font::Font

pub struct Font { /* fields omitted */ }

Wrapper over multiple FontImpl (e.g. a primary + fallbacks for emojis)

Implementations

impl Font[src]

pub fn new(fonts: Vec<Arc<FontImpl>>) -> Self[src]

pub fn round_to_pixel(&self, point: f32) -> f32[src]

pub fn row_height(&self) -> f32[src]

Height of one row of text. In points

pub fn uv_rect(&self, c: char) -> Option<UvRect>[src]

pub fn glyph_width(&self, c: char) -> f32[src]

pub fn layout_single_line(&self, text: String) -> Galley[src]

Typeset the given text onto one row. Any \n will show up as REPLACEMENT_CHAR ('?'). Always returns exactly one Row in the Galley.

pub fn layout_multiline(&self, text: String, max_width_in_points: f32) -> Galley[src]

Always returns at least one row.

pub fn layout_multiline_with_indentation_and_max_width(
    &self,
    text: String,
    first_row_indentation: f32,
    max_width_in_points: f32
) -> Galley
[src]

  • first_row_indentation: extra space before the very first character (in points).
  • max_width_in_points: wrapping width. Always returns at least one row.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.