Struct kas::text::format::FontToken [−]
Expand description
Font formatting token
Fields
start: u32
Index in text at which formatting becomes active
(Note that we use u32
not usize
since it can be assumed text length
will never exeed u32::MAX
.)
font_id: FontId
Font identifier
dpem: f32
Font size, in dots-per-em (pixel width of an ‘M’)
This may be calculated from point size as pt_size * dpp
, where dpp
is the number of pixels per point (see crate::fonts
documentation).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FontToken
impl UnwindSafe for FontToken
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more