This was due to an issue with C++ which has issues with "const char **"
as a _partially_ constant pointer type and requires this modifying to
"char const* const*" to be fully const which can also be written
as "const char* const*" which fixes the API without requiring excessive
casts and removes the various GCC Compiler Warnings emitted when
-Wcast-qual is passed.
We have to include scummsys.h before checking if USE_FREETYPE2 is
defined, and we need wchar.h for the wcslen() function. But I don't know
for certain if everything - or even anything - works correctly now.
This fixes bug #12948 AGS: Segfault when picking up at police report.
For that bug the font is properly loaded by FreeType, but it is a
non-scalable Windows font whose size does not match the requested
size. The original AGS handles TTF font sizes differently to how we
do it in TTFFont (and also has some hacks on top of that), and it
was easier here to use WinFont that try to tweak TTFont to work
with this case.
From upstream 47001a398a1bc4ad022645ad21e1c891a3757167
Note: Since we don't implement alfont in full, the
referenced methods are stubbed in our alfont.cpp
This fixes the line spacing being different in ScummVM
compared to the ags interpreter when displaying
multi-line text with a TTF font. This was for example
easily visible in the letter at the start of Blackwell
Deception.
Allegro does a correction on the text position based
on the font height and character bitmap top. We now
do the same in ScummVM, except we use the font ascent
instead of the character bitmap top as the ScummVM
TTFFont has a correction internally for the difference
between the ascent and character bitmap top.
This change fixes cut text in some games such as in
Order of the Thorne.