[−][src]Struct egui::paint::font::Font
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]
&self,
text: String,
first_row_indentation: f32,
max_width_in_points: f32
) -> Galley
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
impl !RefUnwindSafe for Font
[src]
impl Send for Font
[src]
impl Sync for Font
[src]
impl Unpin for Font
[src]
impl !UnwindSafe for Font
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,