[−][src]Struct blend2d::font::Font
Font
Methods
impl Font
[src]
pub fn from_face(face: &FontFace, size: f32) -> Result<Self>
[src]
Creates a new font from the given FontFace
.
pub fn face(&self) -> &FontFace
[src]
Returns a font-face of the font.
Returns the same font-face, which was passed to
from_face
.
pub fn face_type(&self) -> FontFaceType
[src]
Returns the FontFaceType
of the font.
pub fn face_flags(&self) -> FontFaceFlags
[src]
Returns the FontFaceFlags
of the font.
pub fn units_per_em(&self) -> i32
[src]
Returns the "units per em" (UPEM) of the font's associated font-face.
pub fn size(&self) -> f32
[src]
Returns the size of the font (as float).
pub fn features(&self) -> &Array<FontFeature>
[src]
Returns the font-features used by this font.
pub fn variations(&self) -> &Array<FontVariation>
[src]
Returns the font-variations used by this font.
pub fn weight(&self) -> FontWeight
[src]
Returns the weight of the font.
pub fn stretch(&self) -> FontStretch
[src]
Returns the stretch of the font.
pub fn style(&self) -> FontStyle
[src]
Returns the style of the font.
pub fn font_matrix(&self) -> &FontMatrix
[src]
Returns a 2x2 matrix of the font.
The returned FontMatrix
is used to scale fonts from design units
into user units. The matrix usually has a negative value at the 3rd
index of the internal array as fonts use a different coordinate
system than Blend2D.
pub fn font_metrics(&self) -> &FontMetrics
[src]
Returns a scaled metrics of this font.
The returned metrics is a scale of design metrics that match the font size and its options.
pub fn design_metrics(&self) -> &FontDesignMetrics
[src]
Returns a design metrics of this font.
The returned metrics is compatible with the metrics of FontFace associated with this font.
pub fn shape(&self, buf: &mut GlyphBuffer) -> Result<()>
[src]
pub fn map_text_to_glyphs(
&self,
buf: &mut GlyphBuffer
) -> Result<GlyphMappingState>
[src]
&self,
buf: &mut GlyphBuffer
) -> Result<GlyphMappingState>
pub fn apply_kerning(&self, buf: &mut GlyphBuffer) -> Result<()>
[src]
pub fn apply_g_sub(
&self,
buf: &mut GlyphBuffer,
index: usize,
lookups: usize
) -> Result<()>
[src]
&self,
buf: &mut GlyphBuffer,
index: usize,
lookups: usize
) -> Result<()>
pub fn apply_g_pos(
&self,
buf: &mut GlyphBuffer,
index: usize,
lookups: usize
) -> Result<()>
[src]
&self,
buf: &mut GlyphBuffer,
index: usize,
lookups: usize
) -> Result<()>
pub fn get_text_metrics(&self, buf: &mut GlyphBuffer) -> Result<TextMetrics>
[src]
Trait Implementations
impl Drop for Font
[src]
impl PartialEq<Font> for Font
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Font
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Font
[src]
Auto Trait Implementations
impl !Send for Font
impl Unpin for Font
impl !Sync for Font
impl RefUnwindSafe for Font
impl UnwindSafe for Font
Blanket Implementations
impl<T> ArrayType for T where
T: WrappedBlCore,
[src]
T: WrappedBlCore,
const IMPL_IDX: usize
[src]
unsafe fn push(&mut BLArrayCore, T)
[src]
unsafe fn insert(&mut BLArrayCore, usize, T)
[src]
unsafe fn replace(&mut BLArrayCore, usize, 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.
fn to_owned(&self) -> T
[src]
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.
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>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,