gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Question about text background

#79170 - wickedtrickster - Tue Apr 11, 2006 11:56 pm

It is possible to have tile smaller than 8x8 pixels ?

If not, is there any example/tutorial about how to display text that doesn't look too fixed width ?

Thank you,
Ben.

#79177 - tepples - Wed Apr 12, 2006 12:50 am

Variable width fonts, or proportional fonts, are straightforward. Store an image of each glyph along with the width that the pen should advance after drawing the glyph. You can display each glyph as a sprite, or you can blit the glyphs into a target bitmap and have the screen display this bitmap. In a tiled display architecture, this may involve some shifting around of values. I seem to remember that poslundc was working on a VWF implementation for GBA.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#79276 - wickedtrickster - Wed Apr 12, 2006 5:26 pm

Thank you for the answers.

I will try a tilebase approach and let you know what the results are. I have see many posts on the topic but I didn't found nothing very conclusive.