September 18, 2014
 
 
RSSRSS feed

TechNotes: Fixing SuSE 7.3 - page 3

When Little Problems Get Big

  • November 2, 2001
  • By Dennis E. Powell

Yesterday I received a nice note from Mike Fabian, a SuSE developer, having to do with anti-aliasing not working properly under SuSE 7.3 as numerous people have noticed and as I wrote about Wednesday.

"The reason for the reduced quality of the antialiased fonts in SuSE GNU/Linux 7.3 compared to SuSE GNU/Linux 7.2 is that the byte code interpreter in freetype2 has been switched off," he said.

Due to a change in defaults, the byte code interpreter had come to be switched off. SuSE discovered this before 7.3 was shipped, but decided against turning it on by default for much the same reason that GIF support is not automatically turned on when one compiles Qt -- threat of legal action. In this case, it is Apple whose patents may or may not be infringed by the byte code interpreter in freetype2. SuSE, probably wisely, chose safety.

Which leaves the issue of how to turn the byte code interpreter back on. Again, there is a recipe and again, it must be followed precisely.

Open a terminal and su root as above, except this time instead of "su," type "sux." Put the appropriate CD (in SuSE 7.3 Professional, it is CD 7; I do not know which CD the source RPMs are on in the personal edition, though I suspect it's the third CD. At the command prompt, do:

# mount /dev/cdrom /cdrom
# cd /cdrom/full-names/src
# rpm -i freetype2-2.0.4-23.src.rpm
# cd /usr/src/packages/SPECS
# umount /cdrom [note that the unmount command contains no "n"]
# eject
['eject' is to remove the CD; you don't need to do this, but it's good to remove the CD]

Now, in your editor of choice, open the spec file "freetype2.spec." If you have no editor of choice, type "kedit freetype2.spec." Immediately in KEdit (which will start with the spec file loaded) go to Settings > Configure KEdit > Miscellaneous. In the Wordwrap drop list select "Disable wrapping."

Scroll down the file and you will find a section that looks like this:

%prep
%setup -n freetype-%{version}
%{?suse_update_config:%{suse_update_config -f}}
CFLAGS="$RPM_OPT_FLAGS" make setup CFG="--prefix=/usr"

Add a line to it (it's long and complicated, so feel free to copy and paste it from here) so that the section now says:

%prep
%setup -n freetype-%{version}
perl -pi -e 's/^#undef(?=\s+TT_CONFIG_OPTION_BYTECODE_INTERPRETER)/#define/' ./include/freetype/config/ftoption.h
%{?suse_update_config:%{suse_update_config -f}}
CFLAGS="$RPM_OPT_FLAGS" make setup CFG="--prefix=/usr"

Save the file and close the editor. Then rebuild the RPM package with this command:

# rpm -ba freetype2.spec

When the build is complete, install your new RPM, to wit:

# rpm -Uhv --force /usr/src/packages/RPMS/i386/freetype2*rpm

Exit the su session and the terminal and restart XFree86, and your anti-aliasing will be wonderful once again, presuming that your hardware and desktop support it. My enormous thanks to Mike Fabian for his help here -- if given a month I might have figured out the framebuffer issue that Jon Pennington sorted out, but I would not in a lifetime have solved the anti-aliasing problem.

Sitemap | Contact Us