[Fontconfig] Re: Can we get fonts as sharp as Windows?

Mike FABIAN mfabian at suse.de
Fri Feb 16 01:18:38 PST 2007


"Charles A. Landemaine" <landemaine at gmail.com> さんは書きました:

> Thanks Mike, I do have Freetype 2.2.1 (on PC-BSD). And I also have
> this in my .fonts.conf file:

[...]

> <!-- Enable sub-pixel rendering-->
>
> <match target="font" >
> 	<test name="rgba" qual="all" >
> 		<const>unknown</const>
> 	</test>
> 	<edit mode="assign" name="rgba" >
> 		<const>rgb</const>
> 	</edit>
> </match>

That looks OK. It switches on coloured rendering if your Xserver
cannot find out whether you have an LCD monitor or not.

If your Xserver can detect that you have an LCD monitor, "rgba" will
not be "unknown", it will already be "rgb" when the above rule is
read. When you have an LCD monitor connected via a digital cable
to your computer, the Xserver usually can detect that it is a LCD
monitor. If you use an analog cable, it cannot.

To switch on subpixel hinting unconditionally you could just as well
use the simpler rule:

<match target="font" >
	<edit mode="assign" name="rgba" >
		<const>rgb</const>
	</edit>
</match>

Using that, do you still get only grayscale anti-aliasing and no
colours? Is the value of rgba OK in the FC_DEBUG output?
It should be 1 if you set it to rgb, for example:

mfabian at magellan:~$ FC_DEBUG=4 xfd -fa sans 2>&1 | grep rgba
                    Edit rgba Assign rgb;
                    rgba: 1(i)(s)
                    rgba: 1(i)(s)
                    rgba: 1(i)(s)
                    rgba: 1(i)(s)
                    Edit rgba Assign rgb;
                    rgba: 1(i)(w)
                    rgba: 1(i)(w)
                    rgba: 1(i)(w)
                    rgba: 1(i)(w)
                    rgba: 1(i)(w)
                    rgba: 1(i)(w)
mfabian at magellan:~$

-- 
Mike FABIAN   <mfabian at suse.de>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。
I � Unicode


More information about the Fontconfig mailing list