The program has been tested and works.
A screenshot with a typical english pangram:
rasterworks.png [ 23.9 КБ | 1295 просмотров ]
- "Number of characters" as an input to the function - a good idea.
- Alpha channel support for font color - I don't see the point of it. (But if it can be implemented at minimal cost, so be it.)
- Parameters: Input of width and height of the font is just weird. Ideally, I just want to input the em height of the font, and let the library worry about it.
- Size/speed: It seems the library has traded speed for size by using the kernel's internal font. The performance still seems acceptable at this point. (Perhaps at a later time, the system font can be placed in a shared read-only memory by the kernel, so that the library can work directly with the font data.)
- CountUTF8Z function - It's not what I wanted
What I really need is a function that will tell me the width (and height) in pixels of a piece of text, so that I know if it will fit where I want to put it.
- The library does not take into account the width of the canvas (as seen on the screenshot) - This is not a problem for me, it might even improve the performance of the library a bit.