You are not logged in.

#1 2013-06-22 14:32:12

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,470
Website

Fonts look blurry inside GTK since using Gettext and Autotools

Hey all,

I am noticing an issue in three of my projects, but I have no idea where to start debugging. Let me explain below.

So, I have three projects with GTK3 (and C). At first, I used a simple Makefile and nothing else to compile these applications and all was fine. Some time ago, I imported these into Anjuta (GNOME IDE) which set me up with Autools and also automatically enabled Gettext so I can translate my applications. When I build my applications with Autools, the fonts suddenly look blurry/anti-aliased.

In one project, I managed to resolve these blurry fonts by removing a call to gtk_window_set_default_icon_name(). In another, I can fix it by removing a Pango markup which does nothing but scale a font to size 48 (removing the call to gtk_window_set_default_icon_name() did not work here). In the third project, I have no idea on how to resolve this, as removing the gtk_window_set_default_icon_name() did not solve it this time either and I do not use Pango markup. As you can see, none of these workarounds have anything in common so I have no idea where to start debugging this.

I can think of three causes for this:
1. Autotools;
2. Gettext;
3. Anjuta.

But searching on Google does not give me any viable results.

You can find the code for all three projects on my GitHub, if needed:
1. https://github.com/Unia/gcolor3 - Here I removed the call to gtk_window_set_default_icon_name().
2. https://github.com/Unia/gtimeutils - This one I can solve by removing the Pango markup in GTimer. GStopwatch is fine.
3. https://github.com/Unia/gxms - No clue to resolve.

Perhaps I better ask this on another forum, but I thought I'd try here first. Thanks in advance!

Last edited by Unia (2013-06-22 14:33:36)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2013-06-22 22:41:33

SahibBommelig
Member
From: Germany
Registered: 2010-05-28
Posts: 80

Re: Fonts look blurry inside GTK since using Gettext and Autotools

How are you starting your applications? There are several environement variables that influence behaviour of Gtk/Pango.
Is the result the same when starting it from commandline from a fresh shell to when starting it from anjuta?

Offline

#3 2013-06-23 00:34:22

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,470
Website

Re: Fonts look blurry inside GTK since using Gettext and Autotools

Yea, when I actually install my applications and launch them from GNOME Shell's menu or launcher the fonts look as blurry as they do when I launch them from Anjuta. Other applications look fine and with the workarounds I described above, my own applications display nicely too when launched from either GNOME Shell or Anjuta.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB