I need someone to create a header/cpp file that I can use to render a font that is loaded from a ttf file. Some requirements are such:
Should cache the font (glyphs/bitmaps) such that I can pass any random arrangement of characters in and get a fast render.
Should look good with a font size of 10 to 20. (Will be using for small/medium/large text.)
Needs to support RGBA, this will be displayed on many different backgrounds (light and dark) and the transparency will be used very extensively.
Should be easy to include in my project I'm making in QT Creator on Linux.
Additional benefits would be:
Unicode support.
Colored outlines, I ideally only need a black outline.
Method to query the width of a string before it gets rendered so I can adjust the position prior.
I want a setup somewhere along the lines of:
InitFont("[login to view URL]", size); // This will generate everything needed.
...
renderText(xPos, yPos, color, text, outlineColor); // outlineColor not required.