[][src]Trait pango::FontFamilyExt

pub trait FontFamilyExt: 'static {
    fn get_name(&self) -> Option<GString>;
fn is_monospace(&self) -> bool;
fn is_variable(&self) -> bool;
fn list_faces(&self) -> Vec<FontFace>; }

Trait containing all FontFamily methods.



Required methods

fn get_name(&self) -> Option<GString>

Gets the name of the family. The name is unique among all fonts for the font backend and can be used in a FontDescription to specify that a face from this family is desired.


the name of the family. This string is owned by the family object and must not be modified or freed.

fn is_monospace(&self) -> bool

A monospace font is a font designed for text display where the the characters form a regular grid. For Western languages this would mean that the advance width of all characters are the same, but this categorization also includes Asian fonts which include double-width characters: characters that occupy two grid cells. g_unichar_iswide returns a result that indicates whether a character is typically double-width in a monospace font.

The best way to find out the grid-cell size is to call FontMetrics::get_approximate_digit_width, since the results of FontMetrics::get_approximate_char_width may be affected by double-width characters.


true if the family is monospace.

fn is_variable(&self) -> bool

A variable font is a font which has axes that can be modified to produce different faces.

Feature: v1_44


true if the family is variable

fn list_faces(&self) -> Vec<FontFace>

Lists the different font faces that make up self. The faces in a family share a common design, but differ in slant, weight, width and other aspects.


location to store an array of pointers to FontFace objects, or None. This array should be freed with g_free when it is no longer needed.


location to store number of elements in faces.

Loading content...


impl<O: IsA<FontFamily>> FontFamilyExt for O[src]

Loading content...