Function query_specific

Source
pub fn query_specific(property: &mut FontProperty) -> Vec<String>
Expand description

Query the names of specifc fonts installed in the system Note that only truetype fonts are supported

Examples found in repository?
examples/list-fonts.rs (line 31)
23fn main() {
24	// Enumerate all fonts
25    let sysfonts = system_fonts::query_all();
26    for string in &sysfonts {
27        println!("{}", string);
28    }
29
30	let mut property = system_fonts::FontPropertyBuilder::new().monospace().build();
31	let sysfonts = system_fonts::query_specific(&mut property);
32	for string in &sysfonts {
33		println!("Monospaced font: {}", string);
34	}
35
36	let property = system_fonts::FontPropertyBuilder::new().family("Arial").build();
37	let (font, _) = system_fonts::get(&property).unwrap();
38	println!("{:?}", &font[..50]);
39}