News

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

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.
\d

No comments: