Re: Changing the default pattern weight via config?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, this will works if the best matched fonts against the query pattern has the medium weight because the evaluation of the score for the weight isn't that higher priority in fontconfig. otherwise you may need to write more, particularly for family name maybe.

<match>
  <edit name="weight" mode="append" binding="strong">
    <const>medium</const>
  </edit>
</match>

Without the above:
$ fc-match -f "%{family} - weight: %{weight}\n" "Source Han Sans CN"
Source Han Sans CN,思源黑体 CN,Source Han Sans CN Regular,思源黑体 CN Regular - weight: 80

With the above:
$ fc-match -f "%{family} - weight: %{weight}\n" "Source Han Sans CN"
Source Han Sans CN,思源黑体 CN,Source Han Sans CN Medium,思源黑体 CN Medium - weight: 100

HTH,

On Tue, Sep 13, 2016 at 10:06 AM, Thomas Sibley <www+fontconfig@xxxxxxxxxxxxx> wrote:
Hi,

With version 2.11.1, the default weight for patterns missing a weight
changed from medium to regular.¹  Is there any way to replicate that
change in earlier versions using local configuration files?

I've tried a number of ways with <match> and friends, but I am unable to
force a pattern without a weight to yield weight=regular while still
allowing a pattern with a weight to pass through the <match> unchanged.
The crux of the problem is that I can't determine a way to specifically
match a property with no value (which I believe is what I need to do to
change the pattern before it gets filled in with defaults).

Any pointers would be appreciated.  If it's known to be impossible,
that's also useful to know.  :-)

Cheers,
Thomas

¹ Some context here:
  https://lists.freedesktop.org/archives/fontconfig/2013-October/004978.html
_______________________________________________
Fontconfig mailing list
Fontconfig@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/fontconfig



--
Akira TAGOH
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux