Type Definition skia_safe::Typeface

source ·
pub type Typeface = RCHandle<SkTypeface>;

Implementations§

source§

impl Typeface

source

pub fn new(family_name: impl AsRef<str>, font_style: FontStyle) -> Option<Self>

source

pub fn font_style(&self) -> FontStyle

source

pub fn is_bold(&self) -> bool

source

pub fn is_italic(&self) -> bool

source

pub fn is_fixed_pitch(&self) -> bool

source

pub fn variation_design_position(&self) -> Option<Vec<Coordinate>>

source

pub fn variation_design_parameters(&self) -> Option<Vec<VariationAxis>>

source

pub fn unique_id(&self) -> TypefaceId

source

pub fn equal(face_a: impl AsRef<Typeface>, face_b: impl AsRef<Typeface>) -> bool

source

pub fn from_name( family_name: impl AsRef<str>, font_style: FontStyle ) -> Option<Typeface>

source

pub fn from_data( data: impl Into<Data>, index: impl Into<Option<usize>> ) -> Option<Typeface>

source

pub fn clone_with_arguments( &self, arguments: &FontArguments<'_, '_> ) -> Option<Typeface>

source

pub fn serialize(&self, behavior: SerializeBehavior) -> Data

source

pub fn deserialize(data: &[u8]) -> Option<Typeface>

source

pub fn unichars_to_glyphs(&self, uni: &[Unichar], glyphs: &mut [GlyphId])

source

pub fn str_to_glyphs( &self, str: impl AsRef<str>, glyphs: &mut [GlyphId] ) -> usize

source

pub fn text_to_glyphs<C>( &self, text: &[C], encoding: TextEncoding, glyphs: &mut [GlyphId] ) -> usize

source

pub fn unichar_to_glyph(&self, unichar: Unichar) -> GlyphId

source

pub fn count_glyphs(&self) -> usize

source

pub fn count_tables(&self) -> usize

source

pub fn table_tags(&self) -> Option<Vec<FontTableTag>>

source

pub fn get_table_size(&self, tag: FontTableTag) -> Option<usize>

source

pub fn get_table_data(&self, tag: FontTableTag, data: &mut [u8]) -> usize

source

pub fn copy_table_data(&self, tag: FontTableTag) -> Option<Data>

source

pub fn units_per_em(&self) -> Option<i32>

source

pub fn get_kerning_pair_adjustments( &self, glyphs: &[GlyphId], adjustments: &mut [i32] ) -> bool

source

pub fn new_family_name_iterator(&self) -> impl Iterator<Item = LocalizedString>

source

pub fn family_name(&self) -> String

source

pub fn post_script_name(&self) -> Option<String>

source

pub fn to_font_data(&self) -> Option<(Vec<u8>, usize)>

source

pub fn bounds(&self) -> Rect

Trait Implementations§

source§

impl Debug for Typeface

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Typeface

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Send for Typeface

source§

impl Sync for Typeface