( My personal website has gone to dust, any links thereto will fail. This site will be home for a while. )

Sunday, 4 October 2009

Fonty 0.4.3 Test it please!

I have worked hard for about two weeks now and I am quite happy with things. There are still problems (keyboard things mostly) but it's quite usable.

Get it here:
svn co svn://

Screenshot - a little out of date, but shows the general idea.

Stuff I done did
  1. Fonts that have weird spacing to the left and top are now cropped to fit. This is optional (see Settings) because it adds work per font and is slightly slower.
  2. After much experimentation I finally got Fonty to spawn either gucharmap or kfontview for any given font — and you can open multiple windows. There is a new button on each font item (bottom left). Only valid fonts can be viewed.
    I chose those two because:
    • Doing a character map of my own is just insane.
    • I searched around in the Debian repos and online for other viewers and those are the two that seem prevalent. If there are others, let me know so I can attempt to wire them in.
    On startup, Fonty will look for them and only offer what is installed (see
  3. I flipped the tabs for Source to the bottom. My thinking is that most work happens at the bottom of the app: paging, filtering and when you scroll down in the view, you end-up at the bottom anyway. So, the tabs are closer now. This might suck...
  4. I added some quick filter toggle buttons for Bold, Italic and
  5. I did a lot of work on the appearance of the font view. There are lots of tweaks and icons/colours to represent bad fonts.
  6. When more than 20 fonts are in any page a wx.Yield() is done so that the entire GUI does not lock-up.
  7. Settings got a notebook (tabs) to better control the new options.
  8. The help file has been up-upgraded.
  9. Many strings have been altered (pog to Pog, for example) and there are some new ones too. Translators alert!
  10. The ability to zip a Pog — was added in 0.4.2 but it's still shiny and new.
  11. Also since 0.4.2 — Font counting. To prevent 'overlaps' when Pogs share common font files and you don't want them uninstalling.
  12. The man page is updated. man -l fontypython.1 will show it.
There are probably more things I have forgotten now. The code has been factored and cleaned (a lot) but there are still areas that are a mess.

Right, I believe that barring any big errors this will be the latest Fonty for some time. I have to move-on to other projects now.


Friday, 2 October 2009

gucharmap command line

I spent an hour on google and on the command-line trying to start gucharmap with a given font name at the command line. No dice. (And don't speak to me about man pages....)

It took the source code for "Font Manager" (A rival to Fonty ;) ) and some small hacking to get it to reveal the secret sauce. Here, then, is the way to do it:

gucharmap --font="SOME DAMN FONT NAME, 32"

The "SOME DAMN FONT NAME" can be obtained by:
fc-list : family | grep "SOME"
(IOW: You grep through the results with some small snippet of the name you already know, or just scroll through the output.)

The comma is the secret. The number after that is the point size.


Tuesday, 29 September 2009

Fonty 0.4.3 cooking in SVN

Fonts sometimes render in odd positions - seen from a top-left point of view. (I have no skill or experience in right-to-left languages, any help would be appreciated!).

To correct this random affliction, I have had to scan each font image and calculate the x,y of the first actual data therein (anything that is not alpha zero). This works quite well and fonts now draw on a sharp left-top edge, however it is a little slow. I have employed some caching, but resist the idea of storing thousands of bitmaps in a directory for "quick access". That just strikes me as crazy. I may change my mind one day :)

To offset the slowness, there is a new option in the settings dialogue that lets users disable the adjustment; so, it's fair all-round.

This code has been written with an eye on creating a new dialogue that will be a character map of a given font — I will need a way to isolate a single character (or is the correct world glyph?) and control its top-left coordinate — therefore the code is being abstracted to allow a new kind of 'fitmap' (font bitmap) for that purpose.

Version 0.4.3 is underway on the SVN.

Sunday, 27 September 2009

Fonty News

September has been a busy month for Fonty. I have a new version ready to go in the svn. If anyone wants to give it a test run, please head over to and get it while it's hot.

I will be making a tarball in the days to come, so any bugs before then would be nice to know about.

New features:
  • You can zip Pogs into zip files. When you need someone else to have the fonts you used, this is a quick way to do it.
  • Installed fonts are now counted and should the same fonts be referred-to in many Pogs, the font will not be uninstalled until it's absolutely not needed. This fixes an irksome bug with a long pedigree.
  • Lots of little visual improvements have been made. I hope they look as good on other systems and themes...
  • The help file was overhauled.

Right, I hope you like. Send me screen shots if you have the time.

Tuesday, 18 August 2009

Flowcharting Faith

Flowcharting Faith
Over on my personal site I have a new page:

"The idea is to test your beliefs against the flow of the diagram.
Take some proposition and start anywhere (big orange headings are best). Then honestly follow the flow and observe what happens. If you are honest with yourself (and value truth) you should find your belief getting more and more honed and simple — eventually you should end-up with a very small set of things that you have no reason to believe — and a large set of things that you have good reason to."

Might help someone out of Woo, or just confuse the world a little more ;)


Tuesday, 19 May 2009

Things gets a tut.

I just finished writing a short tutorial for the Things API. You can get it on my wiki: or from the CVS on the official website.

The tarball contains a PDF, an SVG file and a bunch of python files. You will still need to fetch the actual API and make a link to it where you want to run the tutorial samples.

It should all make a kind of sense. If it does not, then you need to panic! Run around yelling! Or something.

Have fun with Things.


Saturday, 9 May 2009

Things! An easy animation API for Python.

Announcing "Things" - Vector animation in Python
I just got my Savannah project approved and have uploaded the code to CVS. I have never used a cvs before, so I don't really know what I am doing.

You can visit the project here:

"Things" is a way to make quick visual metaphors and animate them. Things can contain other things -- in this way you can have one Thing moving left-right and then put that into another Thing moving up-down and you'd get an animation doing both.

There's more to it than that; you can tell individual things when to stop and start; what to do and when to do it; how to move and so on.

There is a primitive event-system going; so you can produce buttons and hit areas and so forth.

Inkscape and SVGs
Things was written with Inkscape in mind. You draw your graphics there, give stuff id's and then in your Things Python code, you can refer to those ids and use the SVG directly. The whole idea was to use Inkscape as the "IDE" and Things as the animation engine.

There are ways to create:
1. "Sprites" - Single frame drawings.
2. "Loops" - Drawings that will change over time -- like a walk cycle.
3. "Paths" - Simple paths for things like line drawing or following.
4. "Masks" - Also simple paths, but intended for clipping and hit-detection etc.

Each of these is drawn in a layer within Inkscape (and there are a few simple rules to follow) after which you simply pull them out in Python and use 'em!

Help code! Take it away!
So, come on over and give it a whirl. Perhaps you can improve it and code it into some fast C/assembler. It sure needs more love and skill than I can bring :)


Sunday, 1 February 2009

My new website!

I have put together a Django-powered website of my own -- come visit it at -- I have a bunch of comics, tutorials and some writing there.