Struct FontInfo

Source
pub struct FontInfo {
Show 15 fields pub point_size: u32, pub height: i32, pub width: i32, pub escapement: i32, pub orientation: i32, pub weight: i32, pub italic: bool, pub underline: bool, pub strike_out: bool, pub char_set: u8, pub out_precision: u8, pub clip_precision: u8, pub quality: u8, pub pitch_and_family: u8, pub name: String,
}
Expand description

Represent a font parameters. Returned by the font dialog when the user selected a font. Can also be used to create a Font resource using Font::from_info For more information on the parameters see: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfonta

Fields§

§point_size: u32

The size of the selected font, in units of 1/10 of a point

§height: i32

Specifies the height, in logical units, of the font’s character cell or character.

§width: i32

Specifies the width, in logical units, of characters in the font.

§escapement: i32

Contains the angle, in tenths of degrees, between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text.

§orientation: i32

Specifies the angle, in tenths of degrees, between each character’s base line and the x-axis of the device.

§weight: i32

Specifies the weight of the font in the range from 0 through 1000.

§italic: bool

Specifies an italic font if set to TRUE

§underline: bool

Specifies an underlined font if set to TRUE.

§strike_out: bool

Specifies a strikeout font if set to TRUE.

§char_set: u8

Specifies the character set.

§out_precision: u8

Specifies the output precision. The output precision defines how closely the output must match the requested font’s height, width, character orientation, escapement, pitch, and font type.

§clip_precision: u8

specifies the clipping precision. The clipping precision defines how to clip characters that are partially outside the clipping region.

§quality: u8

specifies the output quality. The output quality defines how carefully the GDI must attempt to match the logical-font attributes to those of an actual physical font.

§pitch_and_family: u8

Specifies the pitch and family of the font.

§name: String

Contains a null-terminated string that specifies the typeface name of the font.

Trait Implementations§

Source§

impl Clone for FontInfo

Source§

fn clone(&self) -> FontInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for FontInfo

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.