pub struct Font { /* private fields */ }Expand description
Represents an ttf font
Use with FormattedText to render text this font.
Implementations§
source§impl Font
impl Font
sourcepub fn new(handle: ResourceHandleRepr, scale: f32) -> Self
pub fn new(handle: ResourceHandleRepr, scale: f32) -> Self
Creates a new Font. This creates a data object in the host that can be shared
for multiple entities.
sourcepub fn set_debug_name(&self, name: &str)
pub fn set_debug_name(&self, name: &str)
Sets a debug name of this data object. Useful for debugging memory usage and leaks.
sourcepub fn data_handle(&self) -> DataHandle
pub fn data_handle(&self) -> DataHandle
Get raw data handle.
Trait Implementations§
source§impl PartialEq<Font> for Font
impl PartialEq<Font> for Font
source§impl ValueConverterTrait<Font> for ValueConverter
impl ValueConverterTrait<Font> for ValueConverter
source§fn into_value(v: Font) -> Value
fn into_value(v: Font) -> Value
Wraps the passed-in value in a
Value enum.source§fn from_value(v: &Value) -> Font
fn from_value(v: &Value) -> Font
Extracts the value from a
Value enum.impl StructuralPartialEq for Font
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§
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