Ubuntu in state of DVD denial

One of the things I have had trouble with ever since I installed Ubuntu was playing DVDs. I need to use DVDs as source material for the graphics I do for both work and pleasure, and not being able to play all the DVDs I am sent was becoming increasingly frustrating. Although a large number of DVDs wouldn’t even mount in Ubuntu, the DVD player under my telly played them fine.

I tried the normally excellent Ubuntu UK IRC channel to no avail, so I was on my own. Eventually I discovered the mount -l command, and saw the letters UDF. That turned out to be a vital clue.

And today, by a stroke of luck, I found this page. Not only was the problem explained, but a (partial) solution was given. I can now play any DVD, provided I open it from a session of Nautilus running as the root user.

dave@dave-desktop:~ sudo /usr/bin/nautilus

Being careful to save the files on my Desktop, and not root’s Desktop, I could take screen shots that frustratingly I couldn’t delete or move.

That’s because the screen shots I took from Nautilus running as root also had root privilges, so a bit more command line lurve was needed – the “chown” (or change owner) command:

dave@dave-desktop:~/Desktop cd dave Screenshot1.png

Now I’m happy and can do lots of delightfully rainbow coloured Granada “Giro” Gs to accompany Derek Hilton and his band…

Creating A Font with Inkscape and FontForge

One of the things I wanted to do on Ubuntu was to create a TrueType font. I have done this in the past using Fontographer and Macromedia Flash on Windows, but I wanted to have a go using Free Software to see how the process compared.

I had the font I wanted to digitise as a high quality scan. I imported that into Inkscape and created all the characters, or glyphs:

Glyphs created over the scanned original

As it was my first time doing this in Inkscape, I made a number of mistakes. Firstly, I created the fonts as filled shapes. If you are going to create a TrueType font then outlines are enough. The biggest problem with using fills instead of outlines in Inkscape is that you can never see if a path is “closed” properly – this will cause problems for the font editing software later on.

Another mistake was that I had forgotten I could not overlap paths – if you do, the overlapping area becomes transparent. Each path has to be made of continuous oulines so, in the case of the capital letter Q I could not draw the circle as one path and the square tail stroke as another.

The next thing I needed to do was to create an .svg file for each letter.

.svg files created for each glyph

Again, I made mistakes doing this. I created a 1000 x 1000 pixel file for each glyph with a 200 pixel base line that the letters would sit on. I should have realised that for .ttf files your glyph size needs to be a power of 2, so I should have used 1024 pixel files.

The next thing was to import the glyphs into FontForge 2. FontForge is an excellent program, if you can get past the fact that the interface looks like it decided 1990 was so lovely it would stay there. It looks a bit daunting but in fact, skimming three pages of the online manual, including this one, was enough to create a truetype font with metrics and kerning.

The most valuable thing in FontForge is the Ctrl+Shift+D to correct the direction of your paths (whether your paths are clockwise or anticlockwise is something very important for font creation).

My corrected Q in FontForge

Once you have got your glyphs imported into FontForge, what you have in essence is a monospaced font – all the letters are the same width. The next job is the metrics – in other words changing the widths of each letter so that the I is thinner than the Q. FontForge makes this very easy, with a drag and drop interface.

After that you have to correct the Kerning – in other words coping with the fact that with two letter combinations such as AV the V is should be moved a little closer to the A. This was a little complicated to get started but again it’s drag and drop. It took me about three hours to do the metrics and kern all the letter combinations for my font by hand.

Once that was done I just needed to generate my .ttf – something very satisfying.

The end result – B12JP.ttf

And the software didn’t cost a penny. And indeed, neither does the font. I’ve released the font under CC-BY-SA and it is available to download from here.

Converting .ai files from Flash 8 to .svg

This morning I wanted to use a number of the graphics I have done in Flash in Inkscape.

The .swf and .fla files are stuck at the moment until I have access to a copy of Flash, but I also have a large stock of .ai files. I exported them from Flash 8 to use in Fireworks, which allowed me to use various raster effects on my vector artwork.

Inkscape would only import Adobe Illustrator 9 files, but Flash 8 exported .ai files in Adobe Illustrator 6 format. However, the solution was already available and installed on my computer with Inkscape. It just needed a bit of “command line love” (as they say on the Ubuntu UK podcast). The program in question is a command line tool called Uniconvertor, and it’s very easy to use.

Open a terminal, put the .ai files in your Home folder, and type:

dave@dave-desktop:~$ uniconvertor source.ai destination.svg

Very, very useful.