Struct suzy::platform::opengl::FontFamilySourceDynamic[][src]

pub struct FontFamilySourceDynamic<'a> {
    pub atlas_image: &'static [u8],
    pub image_channels: c_int,
    pub image_width: u16,
    pub image_height: u16,
    pub image_row_alignment: u16,
    pub normal: (u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)]),
    pub bold: Option<(u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])>,
    pub italic: Option<(u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])>,
    pub bold_italic: Option<(u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])>,
}

A source for a font family.

This is normally created automatically using the crate suzy_build_tools.

Fields

atlas_image: &'static [u8]

The bytes of the SDF font atlas texture.

image_channels: c_int

The number of channels in the atlas texture.

image_width: u16

The width of the atlas texture.

image_height: u16

The height of the atlas texture.

image_row_alignment: u16

The alignment of the pixel rows in the atlas texture.

normal: (u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])

The font source for the normal font.

bold: Option<(u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])>

The font source for the bold font.

italic: Option<(u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])>

The font source for the italic font.

bold_italic: Option<(u8, &'a [(char, f32, f32, f32, f32, f32, f32, f32, f32, f32)], &'a [(char, char, f32)])>

The font source for the bold and italic font.

Implementations

impl<'a> FontFamilySourceDynamic<'a>[src]

pub fn load(&self) -> FontFamilyDynamic<'a>[src]

Load a font family from this source.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.