Crate fontconfig_parser

source ·
Expand description

This crate provide parsing fontconfig file but not yet complete all features

see https://www.freedesktop.org/software/fontconfig/fontconfig-user.html for more detail infomation of fontconfig file

§Example

use fontconfig_parser::FontConfig;

let mut config = FontConfig::default();

config.merge_config("/etc/fonts/fonts.conf").unwrap();

Structs§

  • Alias elements provide a shorthand notation for the set of common match operations needed to substitute one font family for another. They contain a element followed by optional , and elements. Fonts matching the element are edited to prepend the list of ed families before the matching , append the able families after the matching and append the families to the end of the family list.
  • Final dir data
  • This element contains a directory name where will be mapped as the path ‘as-path’ in cached information. This is useful if the directory name is an alias (via a bind mount or symlink) to another directory in the system for which cached font information is likely to exist. ‘salt’ property affects to determine cache filename as same as Dir element.
  • Final remap-dirs data
  • This element contains a single value which is compared with the target (‘pattern’, ‘font’, ‘scan’ or ‘default’) property “property” (substitute any of the property names seen above). ‘compare’ can be one of “eq”, “not_eq”, “less”, “less_eq”, “more”, “more_eq”, “contains” or “not_contains”. ‘qual’ may either be the default, “any”, in which case the match succeeds if any value associated with the property matches the test value, or “all”, in which case all of the values associated with the property must match the test value. ‘ignore-blanks’ takes a boolean value. if ‘ignore-blanks’ is set “true”, any blanks in the string will be ignored on its comparison. this takes effects only when compare=“eq” or compare=“not_eq”. When used in a element, the target= attribute in the element selects between matching the original pattern or the font. “default” selects whichever target the outer element has selected.

Enums§

Functions§

  • Parse as raw config parts use this when you want custom handling config file

Type Aliases§