Make font sizes more accurate to the vanilla EXE
This is such a nightmare
This commit is contained in:
parent
78da025796
commit
770f3be74e
2 changed files with 13 additions and 5 deletions
14
src/Draw.cpp
14
src/Draw.cpp
|
@ -653,6 +653,17 @@ void InitTextObject(const char *name)
|
|||
|
||||
switch (mag)
|
||||
{
|
||||
#ifdef JAPANESE
|
||||
case 1:
|
||||
height = 12;
|
||||
width = 12;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
height = 20;
|
||||
width = 20;
|
||||
break;
|
||||
#else
|
||||
case 1:
|
||||
height = 10;
|
||||
width = 9;
|
||||
|
@ -660,8 +671,9 @@ void InitTextObject(const char *name)
|
|||
|
||||
case 2:
|
||||
height = 18;
|
||||
width = 16;
|
||||
width = 17;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
font = LoadFont(path.c_str(), width, height);
|
||||
|
|
|
@ -1069,10 +1069,6 @@ FontObject* LoadFontFromData(const unsigned char *data, size_t data_size, unsign
|
|||
|
||||
if (FT_New_Memory_Face(font_object->library, font_object->data, (FT_Long)data_size, 0, &font_object->face) == 0)
|
||||
{
|
||||
#ifdef JAPANESE
|
||||
cell_width = 0; // Cheap hack to make the font square
|
||||
#endif
|
||||
|
||||
FT_Set_Pixel_Sizes(font_object->face, cell_width, cell_height);
|
||||
|
||||
font_object->glyph_list_head = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue