Saturday, April 28, 2007

Oops, I lost my rpmdb

Yesterday my computer started randomly rebooting when I was trying to install packages on my computer, so I booted from a live CD and ran resierfsck on my disk, which fixed a whole bunch of things. But now when I run rpm -qa I get a list of no packages - and running rpmdb --rebuilddb doesn't help. Fortunately smart query lists everything that is installed, so I'm pretty sure there must be some way to get the rpmdb back, but I can't find it. Help!

Sunday, April 08, 2007

How To Build A New Freetype

I've had several requests for my RPM for freetype2 including sub-pixel rendering for openSUSE 10.2. So here are instructions on how to build your own, including my modified SPEC file. If you're in the USA it might be illegal to download my file, so this file is only for people who live in free countries. Or at least semi-free countries, like the UK.

  1. Download freetype2 source rpm from http://download.opensuse.org/distribution/SL-OSS-factory/inst-source/suse/src/ - it might be a newer version by the time you come to download this.
  2. Download freetype-2.3.3.tar.bz2 and freetype-doc-2.3.3.tar.bz2 from freetype.org.
  3. Download freetype2.spec if your government will let you.
  4. Install the source rpm: sudo rpm -ivh freetype2-2.3.1-7.src.rpm
  5. Put the tar.bz2 files in /usr/src/packages/SOURCES
  6. Put the spec file in /usr/src/packages/SPECS
  7. Build the rpm: rpmbuild /usr/src/packages/SPECS/freetype2.spec
  8. The built rpms will be in /usr/src/packages/RPMS/i586
Note that you will need to have any required libraries and tools installed in order to build this. It should just be the basic development tools I think.

Saturday, April 07, 2007

Sub-pixel Antialiasing in openSUSE 10.2

Finally, I have sub-pixel antialiasing in openSUSE 10.2. For some reason, it was turned off in the 10.2 release because of something being broken. I haven't been able to find out what. But yesterday I got tired of waiting for it to be fixed, so I downloaded the alpha freetype package from 10.3, only to find that it also has sub-pixel antialiasing turned off. No problem - I just installed the source package, replaced the tar files with version 2.3.3 ones, edited the spec file to enable sub-pixel rendering, disabled the freetype2-bitmap-foundry patch (because it wouldn't compile with it in there), rebuilt the rpm and installed it. Hey presto - sub-pixel rendering!

Last time I blogged about getting fonts to look better in 10.1, I had a load of comments telling me I should just turn of antialiasing because text looks better without it. Well, I like antialiasing, and especially sub-pixel antialiasing. On my 1900x1200 display it looks great. So there!