[Fontconfig] Too much bold

Ciprian Popovici ciprian at zuavra.net
Sat Apr 12 05:38:14 EST 2003


On Tue, 08 Apr 2003 15:11:09 -0700 Keith Packard <keithp at keithp.com>
wrote:
> Around 0 o'clock on Apr 9, Ciprian Popovici wrote:
> > I've noticed that, although the "weight" property for the font
> > configuration is supposed to have 5 levels of bold, only 2 can
> > actually be used, on my system at least. There is a threshold around
> > 160 weight value which simply divides"no bold" and "bold".
> 
> I've recently changed fontconfig to use the OS/2 table entries for
> weight to provide more accurate weight values to applications.  That
> should let applications (and users, presumably) see finer gradations
> in weight.
> 
> You'll still be limited to the weights available in the fonts you
> have; fontconfig can only show what's present.

I've gone and applied a little trick, in case anyone's interested. I've
altered the matrix for bold fonts and reduced their horizontal rendering
space a bit. It's slightly better. Here's the thing, I changed the first
double from 1 to 0.9.

<match target="pattern">
  <test qual="any" name="weight" compare="more">
    <int>150</int>
  </test>
  <edit name="matrix" mode="assign">
    <times>
      <name>matrix</name>
      <matrix>
        <double>0.9</double><double>0</double>                   
        <double>0</double><double>1</double>                       
      </matrix>                        
    </times>
  </edit>
</match>

If I understand this correctly, the a certain font's specification
decides how the font should look bold. Fontconfig has no say, it
just renders it. I'm guessing letting the user have access to some
mechanism of altering the rendering process wouldn't be such a good
idea or would it? The matrix does this already, but it doesn't touch the
issue of "how much meat does a character have on it's bones" if I may
say so for lack of actual terminology. :)

-- 
Ciprian Popovici




More information about the Fontconfig mailing list