Type Alias freya_engine::prelude::Typeface

pub type Typeface = RCHandle<SkTypeface>;

Aliased Type§

struct Typeface(/* private fields */);

Implementations§

§

impl RCHandle<SkTypeface>

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

pub fn font_style(&self) -> FontStyle

pub fn is_bold(&self) -> bool

pub fn is_italic(&self) -> bool

pub fn is_fixed_pitch(&self) -> bool

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

pub fn variation_design_parameters(&self) -> Option<Vec<Axis, Global>>

pub fn unique_id(&self) -> u32

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

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

pub fn from_data( data: impl Into<RCHandle<SkData>>, index: impl Into<Option<usize>> ) -> Option<RCHandle<SkTypeface>>

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

pub fn serialize( &self, behavior: SkTypeface_SerializeBehavior ) -> RCHandle<SkData>

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

pub fn unichars_to_glyphs(&self, uni: &[i32], glyphs: &mut [u16])

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

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

pub fn unichar_to_glyph(&self, unichar: i32) -> u16

pub fn count_glyphs(&self) -> usize

pub fn count_tables(&self) -> usize

pub fn table_tags(&self) -> Option<Vec<u32, Global>>

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

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

pub fn copy_table_data(&self, tag: u32) -> Option<RCHandle<SkData>>

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

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

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

pub fn family_name(&self) -> String

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

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

pub fn bounds(&self) -> Rect

Trait Implementations§

§

impl<N> AsRef<RCHandle<N>> for RCHandle<N>where N: NativeRefCounted,

§

fn as_ref(&self) -> &RCHandle<N>

Converts this type into a shared reference of the (usually inferred) input type.
§

impl<N> Clone for RCHandle<N>where N: NativeRefCounted,

§

fn clone(&self) -> RCHandle<N>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<H> ConditionallySend for RCHandle<H>where H: NativeRefCountedBase,

RCHandle<H> is conditionally Send and can be sent to another thread when its reference count is 1.

§

fn can_send(&self) -> bool

Returns true if the handle can be sent to another thread.
§

fn wrap_send(self) -> Result<Sendable<RCHandle<H>>, RCHandle<H>>

Wrap the handle in a type that can be sent to another thread and unwrapped there. Read more
§

impl Debug for RCHandle<SkTypeface>

§

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

Formats the value using the given formatter. Read more
§

impl Default for RCHandle<SkTypeface>

§

fn default() -> RCHandle<SkTypeface>

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

impl<N> Drop for RCHandle<N>where N: NativeRefCounted,

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl<N> Flattenable for RCHandle<N>where N: NativeFlattenable + NativeRefCountedBase,

§

fn type_name(&self) -> &CStr

§

fn serialize(&self) -> RCHandle<SkData>

§

fn deserialize(data: &[u8]) -> Option<RCHandle<N>>

§

impl<N> From<&RCHandle<N>> for RCHandle<N>where N: NativeRefCounted,

A reference counted handle is cheap to clone, so we do support a conversion from a reference to a ref counter to an owned handle.

§

fn from(rch: &RCHandle<N>) -> RCHandle<N>

Converts to this type from the input type.
§

impl<N> PartialEq<RCHandle<N>> for RCHandle<N>where N: NativeRefCounted + NativePartialEq,

§

fn eq(&self, rhs: &RCHandle<N>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<N> PointerWrapper<N> for RCHandle<N>where N: NativeRefCounted,

§

fn wrap(ptr: *mut N) -> Option<RCHandle<N>>

Wraps a native pointer into a wrapper type. Returns None if the pointer is null.
§

fn unwrap(self) -> *mut N

Unwraps the wrapper type into the native pointer.
§

fn inner(&self) -> &N

Access the wrapped pointer.
§

fn inner_mut(&mut self) -> &mut N

Access the wrapped pointer.
§

impl Send for RCHandle<SkTypeface>

§

impl Sync for RCHandle<SkTypeface>