Struct composable::views::ui::font::Inter

source ·
pub struct Inter<'a, Style> { /* private fields */ }
Available on crate features unstable and views and default_ui only.
Expand description

The Inter font

§Inter

Inter is a typeface carefully crafted & designed for computer screens. Inter features a tall x-height to aid in readability of mixed-case and lower-case text. Inter is a variable font with several OpenType features, like contextual alternates that adjusts punctuation depending on the shape of surrounding glyphs, slashed zero for when you need to disambiguate “0” from “o”, tabular numbers, etc.


Sample

Release 4.0

Methods from Deref<Target = Font<'a>>§

source

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

Full font name that reflects all family and relevant subfamily descriptors.

source

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

Family name.

source

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

Subfamily name.

source

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

Unique font identifier

source

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

Should begin with the syntax “Version N.M” (upper case, lower case, or mixed, with a space between “Version” and the number).

source

pub fn size(&self) -> f32

Font size in points.

source

pub fn ascender(&self) -> f32

Horizontal face ascender.

source

pub fn descender(&self) -> f32

Horizontal face descender,

source

pub fn height(&self) -> f32

Horizontal height,

source

pub fn capital_height(&self) -> f32

Capital height,

source

pub fn line_gap(&self) -> f32

Line gap,

source

pub fn text(&self, rgba: [u8; 4], string: &str) -> Text<'_>

Returns a Text in this font.

Trait Implementations§

source§

impl Default for Inter<'static, L>

source§

fn default() -> Self

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

impl Default for Inter<'static, L>

source§

fn default() -> Self

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

impl Default for Inter<'static, L>

source§

fn default() -> Self

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

impl Default for Inter<'static, M>

source§

fn default() -> Self

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

impl Default for Inter<'static, M>

source§

fn default() -> Self

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

impl Default for Inter<'static, M>

source§

fn default() -> Self

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

impl Default for Inter<'static, S>

source§

fn default() -> Self

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

impl Default for Inter<'static, S>

source§

fn default() -> Self

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

impl Default for Inter<'static, S>

source§

fn default() -> Self

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

impl<'a, Style> Deref for Inter<'a, Style>

§

type Target = Font<'a>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DependencyDefault for Inter<'static, L>

source§

impl DependencyDefault for Inter<'static, L>

source§

impl DependencyDefault for Inter<'static, L>

source§

impl DependencyDefault for Inter<'static, M>

source§

impl DependencyDefault for Inter<'static, M>

source§

impl DependencyDefault for Inter<'static, M>

source§

impl DependencyDefault for Inter<'static, S>

source§

impl DependencyDefault for Inter<'static, S>

source§

impl DependencyDefault for Inter<'static, S>

Auto Trait Implementations§

§

impl<'a, Style> Freeze for Inter<'a, Style>

§

impl<'a, Style> !RefUnwindSafe for Inter<'a, Style>

§

impl<'a, Style> Send for Inter<'a, Style>
where Style: Send,

§

impl<'a, Style> Sync for Inter<'a, Style>
where Style: Sync,

§

impl<'a, Style> Unpin for Inter<'a, Style>
where Style: Unpin,

§

impl<'a, Style> !UnwindSafe for Inter<'a, Style>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.