LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   No font antialiasing after update to GTK+ 2.10.4 (https://www.linuxquestions.org/questions/slackware-14/no-font-antialiasing-after-update-to-gtk-2-10-4-a-486205/)

AntZero 09-23-2006 04:53 AM

No font antialiasing after update to GTK+ 2.10.4
 
Hello,

i just compiled gtk+ 2.10.4 and all dependencies (pango 1.14.4, atk 1.12.1, glib2 2.12.3 and cairo 1.2.4) by myself for Slackware-current. All works fine and my main target to compile gimp 2.3.11 with printer support is succeeded.

But now i have no font antialiasing in my gtk2 applications :( GDK_USE_XFT is set to 1 but nothing helps.

Maybe i have forgotten something?

Ilgar 09-23-2006 06:07 AM

It appears that Gtk 2.10.4 has just been released. Why don't you wait a bit and follow the mail list at gtk.org; maybe there's a bug.

dunric 09-23-2006 07:10 AM

Global fontconfig setting may help.
Make sure following code is in /etc/fonts/local.conf and then update fonts cache with fc-cache -fv.
Code:

<match target="font">
  <edit name="antialias" mode="assign">
    <bool>true</bool>
  </edit>
</match>


AntZero 09-23-2006 07:44 AM

Ok, i have created a /etc/fonts/local.conf file and put

Code:

<match target="font">
  <edit name="antialias" mode="assign">
    <bool>true</bool>
  </edit>
</match>

in it then fc-cache -fv but nothing happens :( just no antialiasing.

I have tried the gtk2.10 packages from dropline gnome but there are no antialiasing, too. :confused:

AntZero 09-23-2006 08:21 AM

Ok,something strange is going on. In my home dir there is a .fonts.conf file with

Code:

<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font" >
  <edit mode="assign" name="rgba" >
  <const>rgb</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hinting" >
  <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
  <const>hintmedium</const>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="antialias" >
  <bool>true</bool>
  </edit>
 </match>
</fontconfig>

It means that antialiasing should work, or?

Woodsman 09-23-2006 02:03 PM

Just a wild guess, but have you (re)installed the FreeType 2.1.9 package that has the ByteCode Interpreter enabled? IIRC, Alien Bob has such a package at his wiki. You also should be able to find the same at linuxpackages.net.

I do not know why PV does not compile FreeType that way. Yeah, I know, there is the potential of patent infringement, but many distro vendors package FreeType with the ByteCode Interpreter enabled and nobody yet has been sued. And this has been going on for years. Basic common law dictates that by allowing this practice to continue for many years that the patent holder (Apple?) is estopped from suing because they have let the practice continue for so many years. That is, the doctrine of estoppel says that the patent holder's own actions prevent them from suing. Just as important, there never was any consensus opinion that enabling that option was indeed a patent infringement, but only speculation.

The fonts display is dramatically improved by using FreeType with the ByteCode Interpreter enabled. Dramatically. When I first started using GNU/Linux I considered abandoning the idea until I discovered this little trick. The font display was noticeably inferior with or without anti-aliasing. This one little change was significant enough to motivate me to stick with GNU/Linux. The first thing I do when I update any X11 packages is immediately reinstall FreeType 2.1.9 with the ByteCode Interpreter enabled.

Regarding the .fonts.conf file in your home directory, you can delete that file if your preferences are the same as those of the global files found in /etc/fonts. I use KDE, but all I have to do is open the KDE control center page for font configuration and KDE generates a local file even if I make no changes. Annoying. I'll guess that GNOME does the same.

dunric 09-24-2006 06:02 AM

Quote:

Originally Posted by AntZero
...
in it then fc-cache -fv but nothing happens :( just no antialiasing.
...

What do you mean by nothing has happened ? When you run it in console or terminal it should display list of font directories it rebuilds caches for. Do you get some error output ?

Franklin 09-24-2006 02:32 PM

Quote:

Originally Posted by AntZero
Ok,something strange is going on. In my home dir there is a .fonts.conf file

This file is created by the KDE font/antialiasing applet in the KDE Control Center. Unfortunately, its presence breaks the preferences applet in Gnome that performs the same function. Create a directory and move this file (.fonts.conf) inside of it. Then restart Gnome. This should allow you to set the antialiasing properties in Gnome again using preferences-fonts in the Gnome menu.

I use a modified freetype and do not use antialiasing in KDE. When I go to Gnome, I cannot make the fonts antialiased, nor can I change the hinting settings (not that I want to), unless this file (.fonts.conf) is deleted, renamed or moved.

Yet another way Gnome and KDE do not play nice together.

HTH

AntZero 09-26-2006 03:43 AM

Quote:

Originally Posted by dunric
What do you mean by nothing has happened ? When you run it in console or terminal it should display list of font directories it rebuilds caches for. Do you get some error output ?

I mean that after all no antialiasing is there :( The fc-cache -fv command works fine and print out a list auf directories and font counts.

Now i have reinstalled the FreeType2 package with the bytecode interpreter enabled. The fonts are looking much better now but no antialiasing ...

I moved the .fonts-conf file from my home dir to /etc/fonts as local.conf. It seams to work a little bit. Now, if it set the antialiasing option in local.conf to true there is antialiasing in Firefox (current Slackware package) but not in applications compiled by myself. :confused:

Maybe a linked problem? I have searched my system but i have only one GTK2 and FreeType2 installed. Can it be, that my "home build" applications are linked to some other stuff?

Woodsman 09-27-2006 12:56 AM

While surfing for something else I came across this discusison:

http://www.kde-look.org/content/show.php?content=9714

You did not mention as much, but if you are using GTK apps in KDE 3.5.4 then the you might want to try this "toggle" trick to reset KDE to use antialiasing.

AntZero 09-27-2006 01:29 AM

Quote:

Originally Posted by Woodsman
While surfing for something else I came across this discusison:

http://www.kde-look.org/content/show.php?content=9714

You did not mention as much, but if you are using GTK apps in KDE 3.5.4 then the you might want to try this "toggle" trick to reset KDE to use antialiasing.

Oh my god, this it it! Now i have font antialiasing in gtk apps again. Many thanks for this suggestion.


All times are GMT -5. The time now is 06:57 PM.