Re: [AD] new font system

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


In reply to Vincent Penquerc'h <vincent@xxxxxxxxxx>:
>> > it would also be nice to be able to tell
>> >whether a font is color or not (without having to use a hackish method).

I wrote:
>> Firstly, why?

Vincent Penquerc'h:
>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.

What about fonts which don't use FONT_GLYPHs or BITMAPs? Perhaps it uses
an RLE sprite or something. Then what? You could get a pointer to the
glyph, but you wouldn't know anything about it.

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

What is wrong with text_length()? It is more general (ie. because we
don't have to access individual glyphs and add up their lengths, we can
just ask the library to do it for us).

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



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