#[non_exhaustive]pub struct CustomGlyph {
pub id: u64,
pub text_id: u64,
pub rect: Rect,
pub font_size_px: f32,
}Expand description
A custom glyph detected during crate::MeshEncoder::encode.
klyff does not render custom glyphs itself; it records each detected placeholder along with the layout box it occupies so application code can draw whatever it wants in that position.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u64The id supplied to crate::StyledTextBuilder::push_custom_glyph.
text_id: u64Identifier of the crate::Text this glyph was produced from. Mirrors crate::Text::id.
rect: RectScreen-space box the glyph occupies. The box sits on the text baseline: its bottom edge is
the baseline and it extends upward by the requested height, spanning the requested
width horizontally (both multiplied by the text’s scale).
font_size_px: f32The glyph’s font size in screen-space pixels (font_size * scale).
Trait Implementations§
Source§impl Clone for CustomGlyph
impl Clone for CustomGlyph
Source§fn clone(&self) -> CustomGlyph
fn clone(&self) -> CustomGlyph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CustomGlyph
Auto Trait Implementations§
impl Freeze for CustomGlyph
impl RefUnwindSafe for CustomGlyph
impl Send for CustomGlyph
impl Sync for CustomGlyph
impl Unpin for CustomGlyph
impl UnsafeUnpin for CustomGlyph
impl UnwindSafe for CustomGlyph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more