mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 05:21:16 +00:00
Fix "unexpected end of TTF file" error
Changed returnv vector size to 3 by default and set size 5 for WIN32 only.
This commit is contained in:
parent
64096658e5
commit
0aa140194d
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,7 @@ std::vector<SingleFontData> LoadWidgetFontData(const std::string& name)
|
|||
std::vector<SingleFontData> returnv;
|
||||
if (!stricmp(name.c_str(), "notosans"))
|
||||
{
|
||||
returnv.resize(5);
|
||||
returnv.resize(3);
|
||||
returnv[0].fontdata = LoadFile("widgets/noto/notosans-regular.ttf");
|
||||
returnv[1].fontdata = LoadFile("widgets/noto/notosansarmenian-regular.ttf");
|
||||
returnv[2].fontdata = LoadFile("widgets/noto/notosansgeorgian-regular.ttf");
|
||||
|
@ -62,6 +62,7 @@ std::vector<SingleFontData> LoadWidgetFontData(const std::string& name)
|
|||
wchar_t wbuffer[256];
|
||||
if (GetWindowsDirectoryW(wbuffer, 256))
|
||||
{
|
||||
returnv.resize(5);
|
||||
FString windir(wbuffer);
|
||||
returnv[3].fontdata = LoadDiskFile((windir + "/fonts/yugothm.ttc").GetChars());
|
||||
returnv[3].language = "ja";
|
||||
|
|
Loading…
Reference in a new issue