Enum sfml::graphics::font::FontRef
[−]
[src]
pub enum FontRef {}
A non-owning Font
.
Methods
impl FontRef
[src]
fn kerning(&self, first: u32, second: u32, character_size: u32) -> i32
Get the kerning value corresponding to a given pair of characters in a font
Arguments
- first - Unicode code point of the first character
- second - Unicode code point of the second character
- characterSize - Character size, in pixels
Return the kerning offset, in pixels
fn line_spacing(&self, character_size: u32) -> i32
Get the line spacing value
Arguments
- characterSize - Character size, in pixels
Return the line spacing, in pixels
fn glyph(
&self,
codepoint: u32,
character_size: u32,
bold: bool,
outline_thickness: f32
) -> Glyph
&self,
codepoint: u32,
character_size: u32,
bold: bool,
outline_thickness: f32
) -> Glyph
Get a glyph in a font
Arguments
- codePoint - Unicode code point of the character to get
- characterSize - Character size, in pixels
- bold - Retrieve the bold version or the regular one?
Return the corresponding glyph
fn info(&self) -> Info
Returns the font information.
fn underline_position(&self, character_size: u32) -> f32
Returns the position of the underline.
fn underline_thickness(&self, character_size: u32) -> f32
Returns the thickness of the underline.
Trait Implementations
impl ToOwned for FontRef
[src]
type Owned = Font
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut Self::Owned)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more