Inconsolata and Jedit on Ubuntu 8.04 (Hardy Heron)

The installation process for Jedit(*) on Ubuntu is pretty well documented – as long as you follow option 2 from the jedit download instructions. It’s well worth going for the latest release – as a lot of the plugins don’t work on earlier versions.

But the edit area font looked very uninviting, even with aliasing configured

The fabulous new Inconsolata font looked like the solution. You can install it (or at least the .otf version) as per usual.

But Jedit leans on Java and Java (apparently) requires ttf files, not otf files.

Here’s my workaround which, although a bit hacky, works for me.

  1. Install FontForge
  2. Download the FontForge sources
  3. Open the FontForge source in FontForge
  4. Export it as inconsolata.ttf (ignore any warnings)
  5. Copy it to the ttf-inconsolata font directory that was created as part of the installation of the ubuntu package, e.g: sudo cp inconsolata.ttf /usr/share/fonts/truetype/ttf-inconsolata
  6. Now edit fontconfig.properties.src in /etc/java-6-openjdk and add the following four lines
filename.Inconsolata-Regular=/usr/share/fonts/truetype/ttf-inconsolata/inconsolata.ttf
filename.Inconsolata-Bold=/usr/share/fonts/truetype/ttf-inconsolata/inconsolata.ttf
filename.Inconsolata-Oblique=/usr/share/fonts/truetype/ttf-inconsolata/inconsolata.ttf
filename.Inconsolata-BoldOblique=/usr/share/fonts/truetype/ttf-inconsolata/inconsolata.ttf

There you are, now you can use Inconsolata in your Jedit.

Was it worth it? For me – being used to Windows and Mac it has made my Ubuntu dev environment much more friendly than it was before. YMMV: screenshots of different fonts on my machine are below.

Bitstream Vera Sans 12
Bitstream Vera Sans 12
Courier New 12
Courier New 12
Deja Vu Mono 12
Deja Vu Mono 12
Inconsolata 12
Inconsolata 12

(*) FWIW – I do my RoR hacking on Textmate on the Mac and recently moved from Aptana to Jedit on Windows (I didn’t need the full-on IDE features). On Ubuntu I was looking for an alternative to Eclipse. I started with Gedit for a while but syntax highlighting was pretty poor and I spent too long chasing down all the different advice available on the interwebs and still not getting anywhere. IMHO Jedit is an altogether simpler option for RoR as it needs only a few tweaks as documented by the likes of Eadz and Xiabozz to get you moving in the right direction.

Advertisements

4 thoughts on “Inconsolata and Jedit on Ubuntu 8.04 (Hardy Heron)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s