[−][src]Struct egui::paint::font::Font
The interface uses points as the unit for everything.
Implementations
impl Font
[src]
pub fn new(
atlas: Arc<Mutex<TextureAtlas>>,
font_data: &'static [u8],
scale_in_points: f32,
pixels_per_point: f32
) -> Font
[src]
atlas: Arc<Mutex<TextureAtlas>>,
font_data: &'static [u8],
scale_in_points: f32,
pixels_per_point: f32
) -> Font
pub fn round_to_pixel(&self, point: f32) -> f32
[src]
pub fn line_spacing(&self) -> f32
[src]
Height of one line of text. In points TODO: rename height ?
pub fn height(&self) -> f32
[src]
pub fn uv_rect(&self, c: char) -> Option<UvRect>
[src]
pub fn layout_single_line(&self, text: String) -> Galley
[src]
Typeset the given text onto one line. Assumes there are no \n in the text. Always returns exactly one fragment.
pub fn layout_multiline(&self, text: String, max_width_in_points: f32) -> Galley
[src]
pub fn layout_paragraph_max_width(
&self,
text: &str,
max_width_in_points: f32
) -> Vec<Line>
[src]
&self,
text: &str,
max_width_in_points: f32
) -> Vec<Line>
A paragraph is text with no line break character in it.
The text will be linebreaked by the given max_width_in_points
.
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
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,
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.
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>,