[AD] new font system

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I just tried out the new font system with an older project of mine which
provided dynamic fonts using the old renderhook system.

Of course this didn't work with the new system, but it should be easy to convert.

There is one problem, though: because the fonts are scalable, the height isn't
fixed, but depends on the selected scale. The old system had a height_hook, but
the new system has a fixed int height. This is a pity, because now I'd need
to set the scale on a per-font basis to allow the code to modify this height,
whiloe in the old system you could just set a global text_scale , which would scale
all dynamic textout.

Also I think it's a pity that the unicode lookup system is moved into the vtable,
because now you have to re-implement it each time. IMHO it would have been better to
just put glyph rendering functions in the vtable, and leave the lookup part
in the mainline code.

For the rest it looks cleaner than the old setup.

I do hope it doesn't change *again* since it's the second time I have to
rewrite my dynamic font code (the first version (SPLIF) worked with the
old allegro 3.0 system).


-- 
Martijn Versteegh



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/