Trait embedded_text::utils::font_ext::FontExt [−][src]
pub trait FontExt {
fn total_char_width(c: char) -> u32;
fn str_width_nocr(s: &str) -> u32;
fn max_space_width(n: u32, max_width: u32) -> (u32, u32);
fn strikethrough_pos() -> u32;
}Font extensions
Required methods
fn total_char_width(c: char) -> u32[src]
Returns the total width of the character plus the character spacing.
fn str_width_nocr(s: &str) -> u32[src]
This function is identical to str_width except it does not handle carriage
return characters.
fn max_space_width(n: u32, max_width: u32) -> (u32, u32)[src]
Measures a sequence of spaces in a line with a determinate maximum width.
Returns the width of the spaces that fit into the given space and the number of spaces that fit.
fn strikethrough_pos() -> u32[src]
Returns the y offset for the strikethrough line.
Implementors
Loading content...