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 (take 2) #7572
As the PR is now, I can principally get OpenTTD to load a NanumGothic.ttf without it being installed. However, if I select Korean as game language, it will not use the font for me because it is missing characters. As I just randomly googled for the font file, it is very likely I just have a bad file though.
Freetype properly skipped with MinGW.
Many warnings in fontcache.cpp with MinGW:
This one is fixable by removing one
I have not tried to fix this one.
Maybe a different cast, but don't know which one yet.
This one can be ignored, there are already similar warnings in win32.cpp and win32_v.cpp
Using %lX fixes it.
… 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.
As an aside, I started work on a DirectWrite font renderer (based on this patch) with the intention that it could be used for an eventual UWP build, should we want to go down that route (it would primarily benefit ARM-based Windows 10 devices). FreeType is supported on UWP but GDI isn't, so retaining the possibility of FreeType support on Windows would have some benefit there. In general, I don't see that it would hurt to keep it anyway.