GTK fonts

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

GTK fonts

Postby sumski » Jun 3rd, '11, 08:07

Hi all!
I'm having some problems with font hinting/antialiasing on GTK aplications (ie Mageia control center , firefox , etc...)
They don't follow the same instructions i gave, that KDE apps are following without problems.
What could be the problem?
.fonts.conf:
Code: Select all
<?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>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="autohint">
   <bool>true</bool>
  </edit>
 </match>
 <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>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>


.Xresources:
Code: Select all
! Xft settings ---------------------------------------------------------------
Xft.dpi:        96
Xft.antialias:  true
Xft.rgba:       rgb
Xft.hinting:    true
Xft.hintstyle:  hintslight
Xft.lcdfilter: lcddefault
sumski
 
Posts: 8
Joined: Jun 3rd, '11, 08:03
Location: Zagreb, Croatia

Re: GTK fonts

Postby roadrunner » Jun 3rd, '11, 08:12

Do you have the oxygen-gtk package installed.

.\\artin
- Mageia6 - 64-bit - Plasma 5.8.7 -
- AMD A6-6400K APU -
- 8Gb RAM - nVidia 8500GT GPU -
User avatar
roadrunner
 
Posts: 71
Joined: Jun 1st, '11, 16:00
Location: United Kingdom

Re: GTK fonts

Postby sumski » Jun 3rd, '11, 09:16

Yes, i have!
Here's a screenshot:
Image
sumski
 
Posts: 8
Joined: Jun 3rd, '11, 08:03
Location: Zagreb, Croatia

Re: GTK fonts

Postby anshuljain » Jun 3rd, '11, 18:55

You're gonna have to compile libfreetype6 with subpixel hinting support. The stock Mageia one doesn't have subpixel hinting enabled...but has the BCI enabled. GTK apps respect rendering through cairo and to activate subpixel hinting through cairo one needs the libfreetype6 RPM. I compiled mine locally and added a small file in /etc/fonts/conf.avail called 10-lcd-filter.conf and added the following:-
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Enable freetype's new subpixel filter. Currently, only a cairo
version containing the patches from freedesktop #10301 respects this
setting. -->
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>



Attached is a screenshot of Chromium and Libreoffice with the modifications:- http://www.imagebam.com/image/c6273b135062324
anshuljain
 
Posts: 8
Joined: Jun 3rd, '11, 18:50

Re: GTK fonts

Postby sumski » Jun 3rd, '11, 19:43

Thanks anshuljain , i will try and post results. I must say the overall system inconsisteny is really annoying me! :(
Overall , i'm really happy with Mageia , except for this part. ;)
sumski
 
Posts: 8
Joined: Jun 3rd, '11, 08:03
Location: Zagreb, Croatia

Re: GTK fonts

Postby ahmad » Jun 3rd, '11, 20:51

anshuljain is right. (Hello, anshuljain :)).

The plan is to offer a freetype2 build with sub-pixel rendering enabled in the Tainted repo (it was forgotten before release, what with the many other things that needed to be done and all); the package(s) should be available once the release freeze is over and the other admin tasks are done for Mageia 1 (the SVN is forked.. etc); so say 1-2 weeks maximum. :)

(The Tainted repos are added by not enabled by default, you can enable them from the Mageia control center -> S/W Management -> Configure media sources for install and update, ideally enable the "Tainted Release" and "Tainted Updates" repos; for a quick explanation of how the repos are split in Mageia have a look here).

FWIW, the lcdfilter settings won't affect Qt4/KDE apps in Mageia, even with freetype2 from the Tainted repo, Qt4 uses its internal font rendering code (which is derived from the old freetype2 code IIUC); which isn't bad, since you seem to like it already :).
ahmad
 
Posts: 336
Joined: Mar 22nd, '11, 20:18
Location: Egypt

Re: GTK fonts

Postby anshuljain » Jun 4th, '11, 05:20

Hello ahmad...glad to see you here :)

Regarding this GTK rendering issue, I've filed a bug report at :- https://bugs.mageia.org/show_bug.cgi?id=1570
anshuljain
 
Posts: 8
Joined: Jun 3rd, '11, 18:50


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron