How do you display text with YOUR font engine?
I have a custom made stream class (the streaming is delegated to a stringstream) that supports variable width fonts, various alignments, positioning, and changing the current color mid-stream. A font consists of an image containing all of the characters and a small file listing the widths of all the characters. A single character is drawn using texture mapping.
With SDL I wrote support for both truetype fonts and bitmap fonts (created with the Bitmap Font Builder) by following easy tutorials.
I'll probably use bitmap fonts only for the projects I start now.
I want to write a new filetype that can be used as tileset or for saving animations AND for bitmap fonts.
Not sure if I can do it though. But that is what I want to do in theory.
A file would probably hold several images and all the images different layers as sub-chunks.
So a font would hold all the letters/characters in its layers.
The font engine would have to know what to expect from the font resources of course.
Probably I'm dreaming though ...
I'll probably use bitmap fonts only for the projects I start now.
I want to write a new filetype that can be used as tileset or for saving animations AND for bitmap fonts.
Not sure if I can do it though. But that is what I want to do in theory.
A file would probably hold several images and all the images different layers as sub-chunks.
So a font would hold all the letters/characters in its layers.
The font engine would have to know what to expect from the font resources of course.
Probably I'm dreaming though ...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement