RE: [AD] new font system

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


> However, I do agree that it might be nice to have a separate method for
> outputting glyphs. Perhaps you could add one? It would be trivial to do
> (another advantage of using vtables).

i intended to, but i didn't have the time. i'd be happy to do so, when
i've heard what other people have to say on the subject.
about a slowdown due to a function call, each character is looked up
using a function call and a while loop, and after that bilt is called
(or an equivalent). i don't think a function call will be noticed.

> > it would also be nice to be able to tell
> >whether a font is color or not (without having to use a hackish method).
> 
> Firstly, why? Before I made decisions on what should/should not be
> possible, I considered the context of each problem. IIRC, the only place
> where this is needed is within the grabber.

the glyph finding is not the same: the type of the glyph (either GLYPH
or BITMAP IIRC) changes (though the loop body is the same i think),
and i needed to get one in my code. putting such a function in the vtable
would have solved my problem.
Basically, when i output a string, i first calculate how many entire chars
fill in the space i have allowed, and for this i need more control about
the structure of the font.

> And secondly, this is not hackish. Somebody once proposed adding an `id'
> field to the vtable, but there simply is no point -- just use the vtable
> address (which, as an added bonus, is guaranteed to be unique).

it becomes hackish when the vtables are declared in aintern.h instead
of allegro.h :) but i agree with you that the actual method of comparing
vtables does not shock me :)

-- 
Lyrian 



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