[−][src]Struct quicksilver::graphics::VectorFont
VectorFonts allow drawing characters from TTF files
They store the glyphs as a collection of triangles, allowing them to be scaled up or down
without losing quality. To draw characters to the screen, use the to_renderer
method to
create a FontRenderer
.
Implementations
impl VectorFont
[src]
pub fn from_slice(data: &[u8]) -> Self
[src]
Create a VectorFont from a slice of binary TTF data
pub fn from_bytes(data: Vec<u8>) -> Self
[src]
Create a VectorFont from an owned Vec of TTF data
pub async fn load(path: impl AsRef<Path>) -> Result<Self>
[src]
Load a VectorFont from a TTF file at the given path
pub fn to_renderer(
&self,
gfx: &Graphics,
font_size: f32
) -> Result<FontRenderer>
[src]
&self,
gfx: &Graphics,
font_size: f32
) -> Result<FontRenderer>
Convert a VectorFont to a FontRenderer
for actual use
Auto Trait Implementations
impl RefUnwindSafe for VectorFont
impl Send for VectorFont
impl Sync for VectorFont
impl Unpin for VectorFont
impl UnwindSafe for VectorFont
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,