1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 17:49:10 +00:00

Feature: Add option to adjust font size separately from GUI size. (#7003)

Adds an option in the "Game Options" next to "Interface Size" called "Font Size". Available options are normal, double, and quad.
This commit is contained in:
Greg Carlin
2019-02-23 03:27:46 -05:00
committed by PeterN
parent 56a6d7aec8
commit 00d28a500d
10 changed files with 65 additions and 9 deletions

View File

@@ -462,13 +462,13 @@ static void *ReadSprite(const SpriteCache *sc, SpriteID id, SpriteType sprite_ty
return (void*)GetRawSprite(SPR_IMG_QUERY, ST_NORMAL, allocator);
}
if (sprite->type == ST_FONT && ZOOM_LVL_GUI != ZOOM_LVL_NORMAL) {
/* Make ZOOM_LVL_GUI be ZOOM_LVL_NORMAL */
sprite[ZOOM_LVL_NORMAL].width = sprite[ZOOM_LVL_GUI].width;
sprite[ZOOM_LVL_NORMAL].height = sprite[ZOOM_LVL_GUI].height;
sprite[ZOOM_LVL_NORMAL].x_offs = sprite[ZOOM_LVL_GUI].x_offs;
sprite[ZOOM_LVL_NORMAL].y_offs = sprite[ZOOM_LVL_GUI].y_offs;
sprite[ZOOM_LVL_NORMAL].data = sprite[ZOOM_LVL_GUI].data;
if (sprite->type == ST_FONT && ZOOM_LVL_FONT != ZOOM_LVL_NORMAL) {
/* Make ZOOM_LVL_NORMAL be ZOOM_LVL_FONT */
sprite[ZOOM_LVL_NORMAL].width = sprite[ZOOM_LVL_FONT].width;
sprite[ZOOM_LVL_NORMAL].height = sprite[ZOOM_LVL_FONT].height;
sprite[ZOOM_LVL_NORMAL].x_offs = sprite[ZOOM_LVL_FONT].x_offs;
sprite[ZOOM_LVL_NORMAL].y_offs = sprite[ZOOM_LVL_FONT].y_offs;
sprite[ZOOM_LVL_NORMAL].data = sprite[ZOOM_LVL_FONT].data;
}
return BlitterFactory::GetCurrentBlitter()->Encode(sprite, allocator);