PDA

View Full Version : Zenfont file format specification



code_glitch
10-01-2012, 10:17 PM
Hey andru - was looking through my options a while back on how to get a TTF file to a image of some kind... Inevitably thought of ZenGl and its ZenFont (LCL) application. Although that was a doddle to get working with some primitive and rudimentary yet quite fast ord, char and some tile management. However this was all monospace so I turned to that other file ZenFont generates...

As my hex editor digging suggests, this is the spacing information for characters (This is not definite - my hex editor skills are rusty at best).... I was wondering if, as it was under the GNU/GPL license, it was possible to get a tip or two on how I would go about reading that file byte by byte (or variable by variable)?

I had a look through the source, but being neither a lazarus user or a ZenGL user by default it doesn't make much sense to me. The main reason is that as I was planning to remove sdl for ttf support (and ttf are easy to come by and nice) the ZenGL solution would save me from re-inventing the wheel :)

Cheers,
code_glitch

Andru
11-01-2012, 06:02 AM
Hi,

Strange... there is pretty simple source code in zgl_font.pas :) There are all structures, which are needed and function font_Load. Everything should be clear. If you don't understand something - just ask about concrete moment and I will try to answer :)

code_glitch
11-01-2012, 06:55 PM
zgl_font.pas

Considering I was looking at the application's source and looking there, that might be a good starting point ::)