« February 2009 | Main | April 2009 »

March 22, 2009

Hidden Linux : DIY Font Creation


Mention the term font and people tend to think of A, Bs and Cs. But fonts can be a little more than that ...

Here was my problem: I wanted to add a series of graphical symbols to a spreadsheet. The sort of symbols you get from a font like Webdings. You know, this sort of thing ...



The problem was that Webdings didn't have the symbols I wanted. So I created my own font!



Tools Required

You'll need FontForge and AutoTrace. Ubuntu users can install both with the command

sudo apt-get install fontforge autotrace

You'll also need some graphics. They should be monochrome and stored in bitmap (.bmp) format. Here's one to get you started ...





Method
  • Start FontForge and choose New to open sparkling new font grid ...



  • Double-click one of the X'd spaces to edit the associated letter. This will open up three new windows; a Toolbox, a Layer Selector and a large Editing window.
  • In the Edit window, choose File, Import, select the .bmp file you want to use and click the Import button.
  • In the Layers window, select Back (for background) then move and resize the image to fit within the central frame.


  • Now choose Element, AutoTrace to convert the bitmapped image into vector-based graphics. The image will magically appear on your font grid.



At this point you can simply choose File, Generate Fonts from the letter grid and save your new font. If you want a font with more than a single character in it, simply repeat the process above.



A Few Explanations

TrueType fonts -- of the sort we've just created -- use what are known as vector graphics. Instead of storing the information as a series of pixels, images are stored as a series of points, lines and curves based on mathematical equations. What that means is that they'll scale to any size without any loss of quality. Here for example is a close-up detail of the chef's left whisker made by simply enlarging the original bitmap ...



Blocky, huh? Now check out its vector-based equivalent from the font we just created ...



What a difference!

AutoTrace is the program that performs the miracle conversion from bitmap to vector graphics. Consider it an optional extra. If FontForge finds it when it starts up, it'll be added to its menus. If not, you'll need to do the boundary selection yourself using the editor's Toolbox. It's not difficult, just a little time consuming. (See the Tutorials link below.)

One useful trick: AutoTrace only finds the external boundaries of an object. That's why I left gaps above and below the chef's whiskers -- so AutoTrace could find its way inside. Without the gaps you'll just get a silhouette. Again, you can use the Toolbox to add to the selection. It just means a little more work.

There is of course a lot more to FontForge than this simple example. It has all the in-built tools you'll ever need to create a font from scratch, or you can even use it to modify existing ones. Check out the FontForge Tutorials for all nuts and bolts.



<--Previous Hidden Linux      Next Hidden Linux -->


March 12, 2009

Hidden Linux : Sexy server administration

A while back I recycled an old 386 PC and for use as an Ubuntu-based home file server. The elderly beast hasn't missed a beat since the day it was booted but I've been administering it via the command line over ssh. I actually like using the command line -- probably a reflection of my early training as an assembler programmer -- but I know it's not everyone's cup of tea. So here's a quick guide to adding Webmin to your server.

What's Webmin? Well if you followed the preceeding link you'd know that ...

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files... and lets you manage a system from the console or remotely.

In short, it gives you a sexy admim GUI. And that's not to be sneezed at!




First off you need to download the appropriate package from Webmin HQ. Because my server is running Ubuntu LTS Server Edition, I chose the Debian package.

(If you're really clever you'll have used wget to download it straight to the server. If you're not, you'll need to move the file there first.)

Now connect to the server as usual (typically via ssh), cd to wherever you dumped the download, and -- if if your server's Ubuntu-based -- enter the command

sudo dpkg -i webmin_version_no.deb

At this point you may get messages about missing packages on your server. If you do, just execute

sudo apt-get install -f

to fix'em up.

And that's it! On completion you'll be given a message to the effect that you can now access the server through any client browser with the command

https://server_name:10000/

Before you start howling that doesn't actually work, you should make sure the server name is actually in your client's /etc/hosts file. If it's not, and you can't be bothered adding it, you'll have to connect with the more prosaic

https://IP_address:10000/

Firefox users will almost certainly get a message that saying the secure connection failed. The reason for this is that "the default SSL certificate that is generated by webmin is not issued by a recognized certificate authority." Just choose to add an exception -- or if you're interested in getting a proper SSL certificate, check out the FAQ.

After that you'll be prompted to login to Webmin, and from that point on it's all just point'n'click!


<--Previous Hidden Linux      Next Hidden Linux -->




March 9, 2009

Browser wars: Firefox still climbing

The latest local figures from StatCounter show Internet Explorer continues its steady decline. Around one-third of Kiwis now use Firefox while IE usage is approaching the 50% mark (down from almost 70% six months ago).

On the browser version front Firefox is a solid number two:

Internet Explorer 7.0 44%
Firefox 3.0 31%
Internet Explorer 9%
Safari 3.1 & 3.2 5%
Firefox 2.0 3%
Chrome 1.0 3%
Internet Explorer 8.0 1%
Others 4%

Interestingly, the figures for Antartica show the fox has 100% of the market. What do the ice boffins know that 50% of the rest of us don't...?


Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.