Talk:SubpixelHinting

From openSUSE Community Wiki

Has anyone had any luck getting subpixel hinting working with FF 3 beta (5) ?

Contents

Problem with repository

T have tried one click and zypper but get reported problem of repository not valid

Anyone listening ?

Does anybody read these comments? I thought this was the place to discuss problems etc.

Same problem here on OpenSUSE 11.0 x86_64. Also, subpixel rendering doesn't work in QT 4.4.0/KDE 4.0.4. I think it worked on a recent Knoppix live CD and I have seen screenshots on the net where it worked. Is it disabled because of patent concerns? Google doesn't tell me anything on that matter (or I'm just stupid). By the way, I remember from my FreeBSD days that for subpixel rendering to work properly in GTK2/Cairo apps like Firefox, you have to apply a patch to Cairo (see http://david.freetype.org/lcd/). It takes care of the color bleeding. Now, I don't know the situation on OpenSUSE and I sure hope that once the subpixel repo works, everything magically solves itself. Madleser

RPM manual installation

Have you tried manually installing the RPM packages from the repo? It seemed to work for me, though I'm not sure if I installed the right package, there is two similar package for i586 and a very small package that I'm not sure what's its purpose. But I got subpixel available now

I tried that and it worked. It's just that it doesn't work with QT4 apps... I think they put their own copy of Freetype in QT4 which would need patching? Madleser

Poor SubPixel Hinting in Freetype2 2.3.7

I thought I was simply getting older and my eyes were going bad, but after further investigation it looks like the subpixel hinting that can be enabled in freetype2-2.3.7 isn't nearly as good as it was in freetype2-2.3.5.

For some applications it looks OK, but for others (Yast, konsole with Linux colors, and more) the fonts look quite a bit more "grainy" than they did with subpixel hinting in 2.3.5. I have tried both the 1-click install as well as the zypper install -- no change. In each case subpixel hinting is enabled with RBG and FULL hinting.

What is very noticeable is when hinting is set to MEDIUM (which was my default for freetype2-2.3.5). Set to medium, fonts in Yast look down right ugly as if no hinting has been applied.

Question, does anyone else see this? Also, with 2.3.7, is it still possible to rebuild from the src.rpm and enable hinting with:

   rpmbuild --rebuild --target=$(uname -m) --with subpixel freetype2-*.src.rpm

It seems when this is attempted with 2.3.7, no hinting results. What say the gurus?

Got Subpixel Hinting to work with QT4/KDE4 apps (Yast on OpenSUSE 11.0, Speedcrunch, KTorrent 3.x, ...)

Alright:

  1. Install the custom Freetype 2.3.7 package referenced in the article (if the 1-click-install still doesn't work, get the RPMs manually and install them with "rpm -U freetype*". Add a "--force" if it complains that they are already installed but you can't remember installing them). This is important since it defines FT_CONFIG_OPTION_SUBPIXEL_RENDERING in /usr/include/freetype2/freetype/config/ftoption.h.
  2. Get the current QT4 source package (at the time of this writing, http://download.opensuse.org/update/11.0/rpm/src/libqt4-4.4.0-12.2.src.rpm)
  3. "sudo rpmbuild --rebuild --target=$(uname -m) /path/to/libqt4-4.4.0-12.2.src.rpm" -- if it complains about missing dependencies, install them via Yast. BTW, how do I tell this thing to use my 4 cores for compiling? "MAKEFLAGS='-j 4' sudo rpmbuild ..." doesn't work..
  4. "rpm -Uf /usr/src/packages/RPMS/$(uname -m)/libqt4-x11-4.4.0-12.2.$(uname -m).rpm"

There are only two problems here:

  1. Apparently, QT4 either applies full hinting to fonts or none at all.. hintmedium and hintslight in my fonts.conf are interpreted as hintfull :( Now all my fonts look somewhat ugly but at least I got subpixel hinting... A quick glace at the source (src/gui/text/qfontengine_x11.cpp, line 931) doesn't tell me much..
  2. You have to manually rebuild libqt4 once a new (sub)version comes out. Oh well. Madleser

Edit: Oh boy, I installed KDE 4.2 (devel) with QT 4.5 (devel) from the unstable branch and it gets me subpixel hinting + arbitrary hinting style! No more tedious hacks!