Re: Subpixel Hinting in GTK-applications

Alex Efros <[email protected]> Tue, 15 Jul 2014 18:56:12 +0300
Newsgroups gmane.linux.gentoo.desktop
Organization http://powerman.name/
Message-ID <[email protected]>
Hi!

On Tue, Jul 15, 2014 at 01:45:55PM +0400, =D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=
=B9 wrote:
> Hello everybody. In my Gentoo system (I have also tried Gentoo 2012
> livedvd) GTK-applications (for example: mousepad, gedit, leafpad,
> Firefox, Chromium and all the websites opened in these two browsers)
> do not use Subpixel Hinting.

I'm not a guru of font configuration, but I believe subpixel hinting work=
s
on my system (at least in Firefox), so here is my config:

[ebuild   R    ] www-client/firefox-24.6.0  USE=3D"alsa dbus jit libnotif=
y minimal system-cairo system-icu system-jpeg -bindist -custom-cflags -cu=
stom-optimization -debug -gstreamer (-pgo) -pulseaudio (-selinux) -startu=
p-notification -system-sqlite {-test} -wifi" LINGUAS=3D"ru -af -ak -ar -a=
s -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -csb -cy -da -de -el -en_GB =
-en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE =
-gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko =
-ku -lg -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -nso -or -pa_IN -pl -p=
t_BR -pt_PT -rm -ro -si -sk -sl -son -sq -sr -sv_SE -ta -ta_LK -te -th -t=
r -uk -vi -zh_CN -zh_TW -zu" 0 kB

# eselect fontconfig list
Available fontconfig .conf files (* is enabled):
  [1]   10-autohint.conf
  [2]   10-no-sub-pixel.conf
  [3]   10-scale-bitmap-fonts.conf *
  [4]   10-sub-pixel-bgr.conf
  [5]   10-sub-pixel-rgb.conf *
  [6]   10-sub-pixel-vbgr.conf
  [7]   10-sub-pixel-vrgb.conf
  [8]   10-unhinted.conf *
  [9]   11-lcdfilter-default.conf *
  [10]  11-lcdfilter-legacy.conf
  [11]  11-lcdfilter-light.conf
  [12]  20-unhint-small-dejavu-sans.conf *
  [13]  20-unhint-small-dejavu-sans-mono.conf *
  [14]  20-unhint-small-dejavu-serif.conf *
  [15]  20-unhint-small-vera.conf *
  [16]  25-unhint-nonlatin.conf
  =E2=80=A6

Plus /etc/fonts/local.conf:
<?xml version=3D"1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
	<!-- 3 options affect how fonts will looks like:
	     - antialiasing (enabled by default)
	     - sub-pixel rendering (eselect fontconfig enable/disable 10-no-sub-=
pixel.conf)
	     - hinting (disabled by default)
	-->
	<match target=3D"font">
		<edit mode=3D"assign" name=3D"hinting">
			<bool>true</bool>
		</edit>
	</match>
	<match target=3D"font">
		<edit mode=3D"assign" name=3D"hintstyle">
   			<const>hintfull</const>
  		</edit>
 	</match>
    	<!-- MacOSX's fonts looks ugly when hinting enabled -->
	<match target=3D"font">
		<test name=3D"family">
			<string>Helvetica</string>
		</test>
		<edit name=3D"hinting">
			<bool>false</bool>
		</edit>
	</match>
	<match target=3D"font">
		<test name=3D"family">
			<string>Helvetica Neue</string>
		</test>
		<edit name=3D"hinting">
			<bool>false</bool>
		</edit>
	</match>
	<match target=3D"font">
		<test name=3D"family">
			<string>Monaco</string>
		</test>
		<edit name=3D"hinting">
			<bool>false</bool>
		</edit>
	</match>
	=E2=80=A6
</fontconfig>

--=20
			WBR, Alex.