diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 11210be7be..aed9510d67 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -493,6 +493,7 @@ namespace Config model->height_small = reader->GetSint32("height_small", false); model->height_medium = reader->GetSint32("height_medium", false); model->height_big = reader->GetSint32("height_big", false); + model->enable_hinting = reader->GetBoolean("enable_hinting", true); } } @@ -512,6 +513,7 @@ namespace Config writer->WriteSint32("height_small", model->height_small); writer->WriteSint32("height_medium", model->height_medium); writer->WriteSint32("height_big", model->height_big); + writer->WriteBoolean("enable_hinting", model->enable_hinting); } static bool SetDefaults() diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 089e9a95f8..1817316338 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -191,6 +191,7 @@ typedef struct FontConfiguration sint32 height_small; sint32 height_medium; sint32 height_big; + bool enable_hinting; } FontConfiguration; enum SORT diff --git a/src/openrct2/drawing/string.c b/src/openrct2/drawing/string.c index e4741d0e8c..9f84374f8e 100644 --- a/src/openrct2/drawing/string.c +++ b/src/openrct2/drawing/string.c @@ -14,6 +14,7 @@ *****************************************************************************/ #pragma endregion +#include "../config/Config.h" #include "../interface/colour.h" #include "../interface/viewport.h" #include "../localisation/localisation.h" @@ -799,7 +800,7 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo *dpi, const utf8 *text, te *(dst + width + dstScanSkip + 1) = info->palette[3]; } - if (*src > 180) + if (*src > 180 || !gConfigFonts.enable_hinting) { // Centre of the glyph: use full colour. *dst = colour; diff --git a/src/openrct2/drawing/ttf.c b/src/openrct2/drawing/ttf.c index 8d3b0b983a..73c5d5227f 100644 --- a/src/openrct2/drawing/ttf.c +++ b/src/openrct2/drawing/ttf.c @@ -19,6 +19,7 @@ #include #include FT_FREETYPE_H +#include "../config/Config.h" #include "../localisation/localisation.h" #include "../OpenRCT2.h" #include "../platform/platform.h" @@ -276,7 +277,14 @@ static bool ttf_get_size(TTF_Font * font, const utf8 * text, sint32 * outWidth, static TTFSurface * ttf_render(TTF_Font * font, const utf8 * text) { - return TTF_RenderUTF8_Shaded(font, text, 0x000000FF, 0x000000FF); + if (gConfigFonts.enable_hinting) + { + return TTF_RenderUTF8_Shaded(font, text, 0x000000FF, 0x000000FF); + } + else + { + return TTF_RenderUTF8_Solid(font, text, 0x000000FF); + } } void ttf_free_surface(TTFSurface * surface)