Results 1 to 10 of 14

Thread: Text output pixel by pixel 8x8

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Two reasons: first one needn't ship any external bitmap files. Second I can easily change the size of the font, for e.g. title, score etc. It's just for lazyness if one uses my interpreter so he/she needn't take care of that. Just a "drawtext" and that's it. But no one is forced to use the built-in font but can use his own bitmap font.
    In my old version of EGSL I am using SDL_gfx which has a built-in bitmap font and I recognized that a lot of people use it for a simple text output (and even input).
    Best regards,
    Cybermonkey

  2. #2
    Quote Originally Posted by Cybermonkey View Post
    Two reasons: first one needn't ship any external bitmap files. Second I can easily change the size of the font, for e.g. title, score etc.
    1. You can still generate these bitmas programatically at apprication start if you want.
    2. Why not use some TrueType font to Bitmap Font converter which would alow you to easily make BitmapFonts of any desired size. And since TrueType Fonts (athleast never versions) are vector based you will get best results when scaling them.

  3. #3
    why not embedding the bitmaps for different resolutions fonts? I think that rendering pixel per pixel is just a waste of time. you can even create you beautiful font in any good graphical tool and then convert it to text include files.

  4. #4
    I have no comparison but I think using the rectangles is fast enough. I made a test with 1000 x "Hello crazy World" with random colours, positions, alphablends and textsizes. The result is (on my machine here): 176 ms.

    fonttest.jpg
    Best regards,
    Cybermonkey

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •