Change a PNG font on the fly

Previous topic - Next topic

Ian Price

He's not loading a font - it's a bitmap, hence my two routines for indicating the width of each character.
I came. I saw. I played.

kanonet

Doesnt matter if he loads it as sprite or create it at runtime - he just needs to do this before he can use kerning.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Ian Price

#17
That's why I offered the array example (first) as well as the hardcoded method. The array can be filled manually or by the pc checking the char size via code. He's not going to get character font kerning sizes from nowhere.

Here's an example of polyvector fonts from a bitmap image that I created for a TouchPad app a year or so ago.
I came. I saw. I played.

kanonet

I know thats why i was just supporting your 1st suggestion. Was just saying that i would not recommand the hardcoded one (your 2nd suggestion), but that your 1st one is a good way.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64