X11 GTK sub-pixel anti-aliasing?

Evan Jones evanj at MIT.EDU
Tue Feb 24 18:02:08 PST 2009


The text drawn by my GTK apps from MacPorts does not use sub-pixel  
anti-aliasing, despite the fact I have tried to configure my  
~/.fonts.conf file to specify that it should be used. If I run the  
system xterm: "/usr/X11/bin/xterm -fa Monaco" I get an xterm that has  
subpixel rendered fonts. The same works with macport's xterm, so it  
must be a GTK configuration issue? If I run gtk-demo or any other app,  
the fonts are anti-aliased, but taking a screenshot or using  
DigitalColor Meter shows that they are not sub-pixel anti-aliased. As  
a result, they look less than perfect.

Any suggestions for how I can get this to work? Technical details  
below. Thanks,

Evan Jones


Mac OS X 10.5.6 on Intel
X11: XQuartz 2.3.2

which xterm: /usr/X11/bin/xterm
which gtk-demo: /opt/local/bin/gtk-demo


yamnuska:~ ej$ port list freetype pango gtk2 cairo xterm fontconfig
freetype                       @2.3.8          print/freetype
pango                          @1.22.4         x11/pango
gtk2                           @2.14.7         x11/gtk2
cairo                          @1.8.6          graphics/cairo
xterm                          @238            x11/xterm
fontconfig                     @2.6.0          graphics/fontconfig
yamnuska:~ ej$ cat ~/.fonts.conf
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
</match>

</fontconfig>



--
Evan Jones
http://evanjones.ca/



More information about the macports-users mailing list