Bmx-NG RPI loadimagefont Bug ?!

BlitzMax Forums/Brucey's Modules/Bmx-NG RPI loadimagefont Bug ?!

Panno(Posted 2016) [#1]
rpi :

if i loading a new font and set the font to the new font i see only some quads /rects but no letter
i think its a bug


Brucey(Posted 2016) [#2]
Do you happen to have a small example? :-)

You know that DrawText uses a new texture per glyph? It may well be that you are running out of memory for your textures?
Also, DrawText is *highly* inefficient - and not at all suitable for using on mobile platforms (which I would consider the Pi to be part of).


Derron(Posted 2016) [#3]
next to this potential bug checkout this module:
https://github.com/maxmods/bah.mod/tree/master/freetypegl.mod


If you want to do this on your own and you do not have a real clue where and how to start:
https://github.com/GWRon/Dig/blob/master/base.gfx.bitmapfont.bmx

The idea is to create a texture atlas of the glyphs (all characters on one image) instead of the ImageFont-approach of having separate images/textures for each character.


@font itself
Which font did you use? I am asking because fonts have different amounts of characters - and so a unicode font containing 60.000 characters means 60.000 images.

In my bitmapfont-class I tried to avoid loading everything, so by default only ANSI is loaded and on request of special characters, the rest is loaded too (LoadExtendedCharacters()).


But before I start derailing the thread, let's wait for your reply what happens if you use a simple TTF file (an indicator might be the filesize of the ttf).


bye
Ron