pango_fc_family_is_monospace only looks at first file in family
I have a font that Pango doesn't recognize as monospace, which was surprising since fc-match -v
shows spacing: 100
.
It turns out that Pango uses the first Fontconfig result to determine the spacing for the whole family (see pangofc-fontmap.c:ensure_families
). In my case the first result was the "black style" font file. For some reason that file doesn't set the spacing
property, while the others do.
On the other hand, fc-match
assumes a "regular" style if none is specified, so it shows the spacing from the "regular" font file, which is correctly set.
The "black" font file should be corrected, but it would probably make for a better user experience if Pango took the spacing from the regular style.