[Fontconfig] Questionable usage of FcPatternAddInteger()

Akira TAGOH akira at tagoh.org
Sat Apr 28 06:07:36 PDT 2012


2012/04/28 4:29 "Fabian Greffrath" <fabian at greffrath.com>:
> Thanks for your reply, but this doesn't really answer my question.
>
> Do you think that using FcPatternAddInteger() in the code I attached to my
> previous mail is a good idea or do you think it does confuse fontconfig
> more than it guides it towards preferring monospaced fonts? I more or less
> want to resemble the behaviour of "fc-match -s" with this code, thus the
> usage of FcFontSort().

The usage of FcPatternAddInteger() is good though I'm wondering why you
didn't set monospace to FC_FAMILY instead. that would gives you more easier
way to do similar thing, but anyway.

Since FC_SPACING also affects to the score estimation, looking good to you
when getting rid of that line was just happened to work.  As I mentioned in
the previous mail, mistake to what you want to do may be you did give
FcTrue to trim in FcFontSort (). you can try to compare the result of
fc-match -s and -a. that may helps to understand what I told you in the
previous mail.

>
>  - Fabian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120428/58992328/attachment.htm>


More information about the Fontconfig mailing list