skia_safe

Type Alias Typeface

Source
pub type Typeface = RCHandle<SkTypeface>;

Aliased Type§

struct Typeface(/* private fields */);

Implementations§

Source§

impl Typeface

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 clone_with_arguments( &self, arguments: &FontArguments<'_, '_>, ) -> Option<Typeface>

Source

pub fn serialize_stream(&self, write: impl Write, behavior: SerializeBehavior)

Source

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

Source

pub fn make_deserialize( data: impl Read, last_resort_mgr: impl Into<Option<FontMgr>>, ) -> 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( &self, text: impl EncodedText, 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 Send for Typeface

Source§

impl Sync for Typeface