[Fontconfig] fc-match for monospace?
behdad at behdad.org
Fri Sep 25 18:36:28 PDT 2009
On 09/25/2009 06:25 PM, Patrick M. Rutkowski wrote:
> I'm very confused about how "fc-match" is supposed to work.
> I run something like: `fc-match :spacing=mono`, or the synonym
> `fc-match :spacing=100`, yet it does NOT give me a monospace font as I
> expected. I instead get:
> Vera.ttf "Bitstream Vera Sans" "Roamn"
> At the same time, `fc-list :spacing=mono fullname` shows that there
> are indeed monospace fonts on the system
> :fullname=Free Monospaced
> :fullname=DejaVu Sans Mono
> What's the deal here?
If you check fcmatch.c, you see that FC_SPACING has a lower priority than
FC_FAMILY, so that's matched first.
> I want to integrate libfreetype in my application for font searching
> in the Linux port. Is it really the case that I won't be able to do
> things like allow the user to ask for a monospace font and ACTUALLY
> GET ONE? (instead of Bitstream Vera Sans).
The right way to do that is to "fc-match monospace"
> Many thanks in advance
More information about the Fontconfig