Struct freetypegl::TextureFont[][src]

pub struct TextureFont { /* fields omitted */ }

Implementations

impl TextureFont[src]

pub fn load(path: &str, pt_size: f32, depth: usize) -> Option<TextureFont>[src]

pub fn load_from_memory(
    font_data: Vec<u8>,
    pt_size: f32,
    depth: usize
) -> Option<TextureFont>
[src]

pub fn glyph(&self, c: char) -> Option<TextureGlyph>[src]

pub fn glyph_by_freetype_id(&self, glyph_id: u32) -> Option<TextureGlyph>[src]

pub fn size(&self) -> f32[src]

Font size

pub fn hinting(&self) -> i32[src]

Whether to use autohint when rendering font

pub fn rendermode(&self) -> RenderMode[src]

Mode the font is rendering its next glyph

pub fn outline_thickness(&self) -> f32[src]

Outline thickness

pub fn filtering(&self) -> i32[src]

Whether to use our own lcd filter.

pub fn lcd_weights(&self) -> [c_uchar; 5][src]

LCD filter weights

pub fn kerning(&self) -> i32[src]

Whether to use kerning if available

pub fn height(&self) -> f32[src]

This field is simply used to compute a default line spacing (i.e., the baseline-to-baseline distance) when writing text with this font. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance.

pub fn linegap(&self) -> f32[src]

This field is the distance that must be placed between two lines of text. The baseline-to-baseline distance should be computed as: ascender - descender + linegap

pub fn ascender(&self) -> f32[src]

The ascender is the vertical distance from the horizontal baseline to the highest ‘character’ coordinate in a font face. Unfortunately, font formats define the ascender differently. For some, it represents the ascent of all capital latin characters (without accents), for others it is the ascent of the highest accented character, and finally, other formats define it as being equal to bbox.yMax.

pub fn descender(&self) -> f32[src]

The descender is the vertical distance from the horizontal baseline to the lowest ‘character’ coordinate in a font face. Unfortunately, font formats define the descender differently. For some, it represents the descent of all capital latin characters (without accents), for others it is the ascent of the lowest accented character, and finally, other formats define it as being equal to bbox.yMin. This field is negative for values below the baseline.

pub fn underline_position(&self) -> f32[src]

The position of the underline line for this face. It is the center of the underlining stem. Only relevant for scalable formats.

pub fn underline_thickness(&self) -> f32[src]

The thickness of the underline for this face. Only relevant for scalable formats.

pub fn atlas(&self) -> TextureAtlas[src]

pub unsafe fn face(&self) -> *mut FT_FaceRec_[src]

Trait Implementations

impl Drop for TextureFont[src]

Auto Trait Implementations

impl RefUnwindSafe for TextureFont

impl !Send for TextureFont

impl !Sync for TextureFont

impl Unpin for TextureFont

impl UnwindSafe for TextureFont

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.