Struct freetype::glyph::Glyph [−][src]
Represents a retrieved glyph from the library
Note that when this glyph is dropped, so is the library
Implementations
impl Glyph
[src]
pub unsafe fn from_raw(library_raw: FT_Library, raw: FT_Glyph) -> Self
[src]
Create a freetype-rs glyph object from c constituent parts
pub fn transform(
&self,
matrix: Option<Matrix>,
delta: Option<Vector>
) -> FtResult<()>
[src]
&self,
matrix: Option<Matrix>,
delta: Option<Vector>
) -> FtResult<()>
Transform a glyph image if its format is scalable.
pub fn get_cbox(&self, bbox_mode: FT_Glyph_BBox_Mode) -> BBox
[src]
Return a glyph’s ‘control box’. The control box encloses all the outline’s points, including Bézier control points. Though it coincides with the exact bounding box for most glyphs, it can be slightly larger in some situations (like when rotating an outline that contains Bézier outside arcs).
Computing the control box is very fast, while getting the bounding box can take much more time as it needs to walk over all segments and arcs in the outline. To get the latter, you can use the ‘ftbbox’ component, which is dedicated to this single task.
pub fn to_bitmap(
&self,
render_mode: RenderMode,
origin: Option<Vector>
) -> FtResult<BitmapGlyph>
[src]
&self,
render_mode: RenderMode,
origin: Option<Vector>
) -> FtResult<BitmapGlyph>
Convert a given glyph object to a bitmap glyph object.
pub fn stroke(&self, stroker: &Stroker) -> FtResult<Glyph>
[src]
pub fn stroke_border(&self, stroker: &Stroker, inside: bool) -> FtResult<Glyph>
[src]
pub fn advance_x(&self) -> isize
[src]
pub fn advance_y(&self) -> isize
[src]
pub fn format(&self) -> FT_Glyph_Format
[src]
An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.
pub fn raw(&self) -> &FT_GlyphRec
[src]
Get the underlying c glyph struct (The system actually calls this a GlyphRec because it can be a different struct in different circumstances)
Trait Implementations
impl Clone for Glyph
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Drop for Glyph
[src]
Auto Trait Implementations
impl RefUnwindSafe for Glyph
impl !Send for Glyph
impl !Sync for Glyph
impl Unpin for Glyph
impl UnwindSafe for Glyph
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,