Struct fontconfig::Pattern [−][src]
A safe wrapper around fontconfig’s FcPattern
.
Fields
pat: *mut FcPattern
Raw pointer to FcPattern
Implementations
impl<'fc> Pattern<'fc>
[src]
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
Auto Trait Implementations
impl<'fc> RefUnwindSafe for Pattern<'fc>
impl<'fc> RefUnwindSafe for Pattern<'fc>
impl<'fc> UnwindSafe for Pattern<'fc>
impl<'fc> UnwindSafe for Pattern<'fc>