const KNOWN_PROPORTIONAL_FONTS: &[&str] = &[
"helvetica",
"arial",
"times",
"georgia",
"verdana",
"tahoma",
"trebuchet",
"calibri",
"cambria",
"garamond",
"palatino",
"book antiqua",
"century",
"dejavu sans",
"dejavu serif",
"liberation sans",
"liberation serif",
"noto sans",
"noto serif",
"roboto",
"open sans",
"lato",
"inter",
"segoe",
"gill sans",
"optima",
"futura",
"avenir",
"lucida sans",
"lucida bright",
];
pub(crate) fn is_truly_monospace(pdfium_fixed_pitch: bool, font_name: &str) -> bool {
if !pdfium_fixed_pitch {
return false;
}
let lower = font_name.to_ascii_lowercase();
!KNOWN_PROPORTIONAL_FONTS.iter().any(|p| lower.contains(p))
}