pub struct FontConfig { /* private fields */ }Expand description
Handle obtained after Fontconfig has been initialised.
Implementations§
Source§impl FontConfig
impl FontConfig
Sourcepub fn substitute(&mut self, pat: &mut Pattern, kind: MatchKind)
pub fn substitute(&mut self, pat: &mut Pattern, kind: MatchKind)
Create a configuration Set configuration as default.
Sets the current default configuration to config. Implicitly calls FcConfigBuildFonts if necessary, and FcConfigReference() to inrease the reference count in config since 2.12.0, returning FcFalse if that call fails. Execute substitutions
Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns false if the substitution cannot be performed (due to allocation failure). Otherwise returns true.
Sourcepub fn fontset_match(
&mut self,
sets: &mut [FontSet<'_>],
pat: &mut Pattern,
) -> OwnedPattern
pub fn fontset_match( &mut self, sets: &mut [FontSet<'_>], pat: &mut Pattern, ) -> OwnedPattern
Return the best font from a set of font sets
Finds the font in sets most closely matching pattern and returns the result of FcFontRenderPrepare for that font and the provided pattern. This function should be called only after FcConfigSubstitute and FcDefaultSubstitute have been called for pattern; otherwise the results will not be correct. If config is NULL, the current configuration is used. Returns NULL if an error occurs during this process.