Struct native_windows_gui::FontInfo[][src]

pub struct FontInfo {
Show 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.