[Fontconfig] More on expressiveness of the config language
Behdad Esfahbod
behdad at behdad.org
Thu Jan 3 23:47:55 PST 2013
I'm trying to write the uncontroversial default bitmap font resizing rules,
but I think I'm stuck and need more expressiveness. In particular, in <test>
expressions I think it's useful to have a target="pattern" also.
This is the logic I hope we can all agree on:
If match target="font":
if not scalable:
pixelsizefixupfactor = pixelsize[pattern] / pixelsize[font]
if pixelsize[pattern] >= 64 or !hinting or
(hinting && (pixelsizefixupfactor > 1.2 ||
pixelsizefixupfactor < 0.8))
set matrix to resize
I think all of that can be done except for the part for "pixelsize[pattern] >=
64". That also can be done by first assigning that to an element of the font
pattern using the new <name target="pattern"> and examining that after.
Perhaps that's all I should do. But I thought I ask if people think a
target="pattern" is more useful in <test> elements?
--
behdad
http://behdad.org/
More information about the Fontconfig
mailing list