I have some existing code using FreeType I did some years ago and have used since, just laying out the glpyhs using the FreeType provided metrics and kerning routine then rendering as mono or 8bit anti-aliased greyscale (some fonts, e.g. Calibri I found will give mono at certain font sizes for most glyphs) then uploading the final result as a D3D or OpenGL texture (so one texture containing the entire block/string of rendered text that I can draw as an alpha blended quad either screen aligned in the UI, or in 3D space).
However I now want to improve this to give correct and higher quality results in more cases. Namely correct handling of composed/decomposed codepoints/glpyhs, non-latin scripts and support for subpixel rendering.
Most of these however appear to not be part of FreeType. e.g. the correct placement of the combining mark for á and Á does not appear to have a FreeType API, and kerning seems to be superseded by GPOS which FreeType does not implement. Things like correct subpixel rendering, while a FreeType feature seem to be highly complex and poorly documented (e.g. how to then deal with coloured text and backgrounds). So at least before I start down that highly complex road am looking at what options I have...
- FreeType itself seems to recommend a library called Pango. However this looks like a pretty big and heavy weight library, pulling in a lot of other difficult dependencies (e.g. parts of GTK and Cario) which while may be fine on Linux, does not look promising for MSVC/Windows/Direct3D. I also found very little information on using Pango with Window's and OpenGL/Direct3D or just games in general...
Is this worth pursuing? It looks like I might be able to do without a lot of GTK and work with in memory bitmaps I can upload to the GPU as textures, but I am not sure if it is really suitable and worth learning about? - On Window's there is DirectWrite. Which I understand I can use via Direct2D and Direct3D. Don't really know much about this, and again if it is generally suitable for games using D3D11 on Windows 7 to 10. Also I would need something different for anything I do on Linux which would seem a lot of extra work.
- Anything else? I had a poke around CEGUI and SDL_ttf, but they seemed to use FreeType in much the same way I did. I am planning to look at CEGUI some more and write a demo to see if it has solutions for my problems, but am not entirely sure it solves everything having read through their FreeType logic and not seen much sign if them implementing the things I did not. Also since I do not plan to port the rest of my UI stuff, mostly just looking for inspiration/examples on fixing up my own FreeType logic.
- Obviously simple bitmap/sprite fonts don't really solve any of my problems here.