pradeep wrote:
Do all the font file formats using glyph's will be more or less similar. Candy could you explain about glyphs because the above document was so brief.
Well... no.
My font renderer was a 1-night programming thing I made for Pype, since he had fonts and some time to port a simple renderer, and I had time and experience with making a simple renderer. I then created this thing, imported 3 fonts (it can only do static width+height fonts) to its format, created 3 conversion tables and made a small display-function.
The files store image data in 8-bit-per-pixel format. Each glyph is x*y bytes, where each byte indicates how transparent the glyph would be at that point. It's then alpha-blended on the display surface, with a given color value as the color of the text.
Each glyph is a representation of a given character. You input a given stream of words, where each word indicates a given character. The renderer takes the current glyph information for that character, tells the display to mix that with the current content and moves the character x and y pointer by the indicated amount. For newlines, it sets the X to a baseline value (which needs to be known) and it moves the y down to the next "line", specified for the entire font.
The specific rendering of the glyph is irrelevant. In this case, it's a "bit"map where each bit has a transparency value, but you can substitute (such as with TTF) a bunch of polygons, which you first need to render to the given size, change according to a bunch of rendering hints (which is TTF specific) and then mix on the display surface.
IMO, it's a load of work you don't need to do for normal display. Just keep a bunch of prerendered ones, it's faster and more reliable.
Was there anything I've missed in this rant?
PS: I'm amazed you found that. I've lost it some time ago and couldn't find it again