[−][src]Struct ndless_freetype::glyph_slot::GlyphSlot
A struct encapsulating the space for a glyph within a Library
Methods
impl GlyphSlot
[src]
pub unsafe fn from_raw(library_raw: FT_Library, raw: FT_GlyphSlot) -> Self
[src]
Create a GlyphSlot
from its constituent C parts
pub fn render_glyph(&self, render_mode: RenderMode) -> FtResult<()>
[src]
Convert a given glyph image to a bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.
pub fn get_subglyph_info(&self, sub_index: u32) -> FtResult<SubGlyphInfo>
[src]
Retrieve a description of a given subglyph. Only use it if the glyph's format is FT_GLYPH_FORMAT_COMPOSITE; an error is returned otherwise.
pub fn get_glyph(&self) -> FtResult<Glyph>
[src]
Returns a glyph object, that is similar to a GlyphSlot
but managed outside of the library
pub fn outline(&self) -> Option<Outline>
[src]
In freetype, the Outline
object is a scalable glyph. This method unpacks a glyph into
this object, or returns None
if the glyph has no outline
pub fn bitmap(&self) -> Bitmap
[src]
This field is used as a bitmap descriptor when the slot format is FT_GLYPH_FORMAT_BITMAP. Note that the address and content of the bitmap buffer can change between calls of FT_Load_Glyph and a few other functions.
pub fn bitmap_left(&self) -> i32
[src]
The bitmap's left bearing expressed in integer pixels. Only valid if the format is FT_GLYPH_FORMAT_BITMAP, this is, if the glyph slot contains a bitmap.
pub fn bitmap_top(&self) -> i32
[src]
The bitmap's top bearing expressed in integer pixels. Remember that this is the distance from the baseline to the top-most glyph scanline, upwards y coordinates being positive.
pub fn advance(&self) -> Vector
[src]
This shorthand is, depending on FT_LOAD_IGNORE_TRANSFORM, the transformed (hinted) advance width for the glyph, in 26.6 fractional pixel format. As specified with FT_LOAD_VERTICAL_LAYOUT, it uses either the ‘horiAdvance’ or the ‘vertAdvance’ value of ‘metrics’ field.
pub fn linear_hori_advance(&self) -> FT_Fixed
[src]
The advance width of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless FT_LOAD_LINEAR_DESIGN is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.
pub fn linear_vert_advance(&self) -> FT_Fixed
[src]
The advance height of the unhinted glyph. Its value is expressed in 16.16 fractional pixels, unless FT_LOAD_LINEAR_DESIGN is set when loading the glyph. This field can be important to perform correct WYSIWYG layout. Only relevant for outline glyphs.
pub fn metrics(&self) -> GlyphMetrics
[src]
The metrics of the last loaded glyph in the slot. The returned values depend on the last load flags (see the FT_Load_Glyph API function) and can be expressed either in 26.6 fractional pixels or font units.
pub fn raw(&self) -> &FT_GlyphSlotRec
[src]
Get a pointer to the underlying c struct
Trait Implementations
impl PartialEq<GlyphSlot> for GlyphSlot
[src]
impl Eq for GlyphSlot
[src]
impl Hash for GlyphSlot
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Copy for GlyphSlot
[src]
impl Clone for GlyphSlot
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom 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> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,