[−][src]Struct fontconfig::Pattern
A safe wrapper around fontconfig's FcPattern
.
Fields
pat: *mut FcPattern
Raw pointer to FcPattern
Implementations
impl<'fc> Pattern<'fc>
[src]
pub fn new(fc: &Fontconfig) -> Pattern
[src]
Create a new Pattern
.
pub fn from_pattern(fc: &Fontconfig, pat: *mut FcPattern) -> Pattern
[src]
Create a Pattern
from a raw fontconfig FcPattern pointer. The pattern is referenced.
pub fn add_string(&mut self, name: &CStr, val: &CStr)
[src]
Add a key-value pair to this pattern.
See useful keys in the fontconfig reference.
pub fn get_string<'a>(&'a self, name: &'a CStr) -> Option<&'a str>
[src]
Get string the value for a key from this pattern.
pub fn get_int(&self, name: &CStr) -> Option<i32>
[src]
Get the integer value for a key from this pattern.
pub fn print(&self)
[src]
Print this pattern to stdout with all its values.
pub fn font_match(&mut self) -> Pattern
[src]
Get the best available match for this pattern, returned as a new pattern.
pub fn name(&self) -> Option<&str>
[src]
Get the "fullname" (human-readable name) of this pattern.
pub fn filename(&self) -> Option<&str>
[src]
Get the "file" (path on the filesystem) of this font pattern.
pub fn face_index(&self) -> Option<i32>
[src]
Get the "index" (The index of the font within the file) of this pattern.
pub fn slant(&self) -> Option<i32>
[src]
Get the "slant" (Italic, oblique or roman) of this pattern.
pub fn weight(&self) -> Option<i32>
[src]
Get the "weight" (Light, medium, demibold, bold or black) of this pattern.
pub fn width(&self) -> Option<i32>
[src]
Get the "width" (Condensed, normal or expanded) of this pattern.
pub fn format(&self) -> Result<FontFormat, UnknownFontFormat>
[src]
Get the "fontformat" ("TrueType" "Type 1" "BDF" "PCF" "Type 42" "CID Type 1" "CFF" "PFR" "Windows FNT") of this pattern.
Trait Implementations
impl<'fc> Clone for Pattern<'fc>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'fc> Debug for Pattern<'fc>
[src]
impl<'fc> Drop for Pattern<'fc>
[src]
Auto Trait Implementations
impl<'fc> RefUnwindSafe for Pattern<'fc>
impl<'fc> !Send for Pattern<'fc>
impl<'fc> !Sync for Pattern<'fc>
impl<'fc> Unpin for Pattern<'fc>
impl<'fc> UnwindSafe for Pattern<'fc>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,