Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GDI engine for font glyph rendering as a replacement for FreeType #6980
This is a semi-serious PR that supplies a native Windows GDI font rendering back-end. It drops FreeType as a required lib, OTOH it is one more code path to maintain while FreeType isn't really causing problems.
Building with FreeType is still possible and will take precedence over the GDI renderer, but
As this is partly a programming exercise, I'm not too invested in it to drop.
I made some measurements with TIC/TOC.
It seems that the
Working around that is more stupid than expected. Simply pre-allocating a guess for the memory works for most glyphs, except if it is something like space, where you have to pass 0 for the size. And of course the failed function call will not tell you the needed memory size so you end up calling the function thrice.
A possible (and ugly) optimization would be https://gist.github.com/michicc/924a562decf38829259e2860a869d2c3
… does not depend on Freetype and into one that does. This makes it easier to add other TrueType font rendering engines.
… including FreeType. Building with FreeType is still possible and will take precedence over the GDI renderer, but the project files don't include FreeType anymore by default. Combining GDI rendering with ICU text layout is untested.
This pull request has been automatically marked as stale because it has not had any activity in the last month.