skia_safe

Type Alias FontMgr

Source
pub type FontMgr = RCHandle<SkFontMgr>;

Aliased Type§

struct FontMgr(/* private fields */);

Implementations§

Source§

impl FontMgr

Source

pub fn new() -> Self

Source

pub fn empty() -> Self

Source

pub fn count_families(&self) -> usize

Source

pub fn family_name(&self, index: usize) -> String

Source

pub fn family_names(&self) -> impl Iterator<Item = String> + use<'_>

Source

pub fn new_styleset(&self, index: usize) -> FontStyleSet

👎Deprecated since 0.41.0: Use new_style_set
Source

pub fn new_style_set(&self, index: usize) -> FontStyleSet

Source

pub fn match_family(&self, family_name: impl AsRef<str>) -> FontStyleSet

Source

pub fn match_family_style( &self, family_name: impl AsRef<str>, style: FontStyle, ) -> Option<Typeface>

Source

pub fn match_family_style_character( &self, family_name: impl AsRef<str>, style: FontStyle, bcp_47: &[&str], character: Unichar, ) -> Option<Typeface>

Source

pub fn match_face_style( &self, _typeface: impl AsRef<Typeface>, _style: FontStyle, ) -> !

👎Deprecated since 0.35.0: Removed without replacement
Source

pub fn new_from_data( &self, bytes: &[u8], ttc_index: impl Into<Option<usize>>, ) -> Option<Typeface>

Source

pub fn legacy_make_typeface<'a>( &self, family_name: impl Into<Option<&'a str>>, style: FontStyle, ) -> Option<Typeface>

Trait Implementations§

Source§

impl Debug for FontMgr

Source§

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

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

impl Default for FontMgr

Source§

fn default() -> Self

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

impl From<RCHandle<SkOrderedFontMgr>> for FontMgr

Source§

fn from(font_mgr: OrderedFontMgr) -> Self

Converts to this type from the input type.
Source§

impl From<RCHandle<skia_textlayout_TypefaceFontProvider>> for FontMgr

Source§

fn from(provider: TypefaceFontProvider) -> Self

Converts to this type from the input type.