[]Struct pangocairo::FontMap

pub struct FontMap(_, _);

FontMap is an interface exported by font maps for use with Cairo. The actual type of the font map will depend on the particular font technology Cairo was compiled to use.

Implements

FontMapExt, pango::FontMapExt, FontMapExtManual

Implementations

impl FontMap[src]

pub fn get_default() -> Option<FontMap>[src]

Gets a default FontMap to use with Cairo.

Note that the type of the returned object will depend on the particular font backend Cairo was compiled to use; You generally should only use the pango::FontMap and FontMap interfaces on the returned object.

The default Cairo fontmap can be changed by using FontMap::set_default. This can be used to change the Cairo font backend that the default fontmap uses for example.

Note that since Pango 1.32.6, the default fontmap is per-thread. Each thread gets its own default fontmap. In this way, PangoCairo can be used safely from multiple threads.

Returns

the default PangoCairo fontmap for the current thread. This object is owned by Pango and must not be freed.

impl FontMap[src]

pub fn new_for_font_type(fonttype: FontType) -> Option<FontMap>[src]

Creates a new FontMap object of the type suitable to be used with cairo font backend of type fonttype.

In most cases one should simply use FontMap::new(), or in fact in most of those cases, just use FontMap::get_default().

fonttype

desired cairo::FontType

Returns

the newly allocated pango::FontMap of suitable type which should be freed with gobject::Object::unref, or None if the requested cairo font backend is not supported / compiled in.

pub fn new() -> Option<FontMap>[src]

Creates a new FontMap object; a fontmap is used to cache information about available fonts, and holds certain global parameters such as the resolution. In most cases, you can use FontMap::get_default instead.

Note that the type of the returned object will depend on the particular font backend Cairo was compiled to use; You generally should only use the pango::FontMap and FontMap interfaces on the returned object.

You can override the type of backend returned by using an environment variable PANGOCAIRO_BACKEND. Supported types, based on your build, are fc (fontconfig), win32, and coretext. If requested type is not available, NULL is returned. Ie. this is only useful for testing, when at least two backends are compiled in.

Returns

the newly allocated pango::FontMap, which should be freed with gobject::Object::unref.

pub fn set_default(font_map: Option<Self>)[src]

Trait Implementations

impl Clone for FontMap

impl Debug for FontMap

impl Display for FontMap[src]

impl Eq for FontMap

impl Hash for FontMap

impl IsA<FontMap> for FontMap

impl Ord for FontMap

impl<T: ObjectType> PartialEq<T> for FontMap

impl<T: ObjectType> PartialOrd<T> for FontMap

impl StaticType for FontMap

Auto Trait Implementations

impl RefUnwindSafe for FontMap

impl !Send for FontMap

impl !Sync for FontMap

impl Unpin for FontMap

impl UnwindSafe for FontMap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<O> FontMapExt for O where
    O: IsA<FontMap>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.