pub struct Font { /* private fields */ }Expand description
A BDF font.
Implementations§
Source§impl Font
impl Font
Sourcepub fn new<T: Into<String>>(name: T, version: Option<T>) -> Self
pub fn new<T: Into<String>>(name: T, version: Option<T>) -> Self
Create a new font with the given name and content-version.
Sourcepub fn set_format<T: Into<String>>(&mut self, format: T)
pub fn set_format<T: Into<String>>(&mut self, format: T)
Sets the BDF format version.
Sourcepub fn set_version<T: Into<String>>(&mut self, version: Option<T>)
pub fn set_version<T: Into<String>>(&mut self, version: Option<T>)
Sets the content-version.
Sourcepub fn bounds(&self) -> &BoundingBox
pub fn bounds(&self) -> &BoundingBox
Gets the default bounding box.
Sourcepub fn set_bounds(&mut self, bounds: BoundingBox)
pub fn set_bounds(&mut self, bounds: BoundingBox)
Sets the default bounding box.
Sourcepub fn set_direction(&mut self, direction: Direction)
pub fn set_direction(&mut self, direction: Direction)
Sets the default direction.
Sourcepub fn scalable_width(&self) -> Option<&(u32, u32)>
pub fn scalable_width(&self) -> Option<&(u32, u32)>
Gets the default scalable width.
Sourcepub fn set_scalable_width(&mut self, value: Option<(u32, u32)>)
pub fn set_scalable_width(&mut self, value: Option<(u32, u32)>)
Sets the default scalable width.
Sourcepub fn device_width(&self) -> Option<&(u32, u32)>
pub fn device_width(&self) -> Option<&(u32, u32)>
Gets the default device width.
Sourcepub fn set_device_width(&mut self, value: Option<(u32, u32)>)
pub fn set_device_width(&mut self, value: Option<(u32, u32)>)
Sets the default device width.
Sourcepub fn alternate_scalable_width(&self) -> Option<&(u32, u32)>
pub fn alternate_scalable_width(&self) -> Option<&(u32, u32)>
Gets the default alternate scalable width.
Sourcepub fn set_alternate_scalable_width(&mut self, value: Option<(u32, u32)>)
pub fn set_alternate_scalable_width(&mut self, value: Option<(u32, u32)>)
Sets the default alternate scalable width.
Sourcepub fn alternate_device_width(&self) -> Option<&(u32, u32)>
pub fn alternate_device_width(&self) -> Option<&(u32, u32)>
Gets the default alternate device width.
Sourcepub fn set_alternate_device_width(&mut self, value: Option<(u32, u32)>)
pub fn set_alternate_device_width(&mut self, value: Option<(u32, u32)>)
Sets the default alternate device width.
Sourcepub fn set_vector(&mut self, value: Option<(u32, u32)>)
pub fn set_vector(&mut self, value: Option<(u32, u32)>)
Sets the default offset vector.
Sourcepub fn properties(&self) -> &HashMap<String, Property>
pub fn properties(&self) -> &HashMap<String, Property>
Gets the properties.
Sourcepub fn properties_mut(&mut self) -> &mut HashMap<String, Property>
pub fn properties_mut(&mut self) -> &mut HashMap<String, Property>
Gets a mutable reference to the properties.
Sourcepub fn glyphs_mut(&mut self) -> &mut HashMap<char, Glyph>
pub fn glyphs_mut(&mut self) -> &mut HashMap<char, Glyph>
Gets a mutable reference to the glyphs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Font
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