mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Remove support for the unused big font
This commit is contained in:
@@ -332,9 +332,6 @@ int32_t string_get_height_raw(char *buffer)
|
||||
case FORMAT_TINYFONT:
|
||||
fontBase = FONT_SPRITE_BASE_TINY;
|
||||
break;
|
||||
case FORMAT_BIGFONT:
|
||||
fontBase = FONT_SPRITE_BASE_BIG;
|
||||
break;
|
||||
case FORMAT_MEDIUMFONT:
|
||||
fontBase = FONT_SPRITE_BASE_MEDIUM;
|
||||
break;
|
||||
@@ -640,9 +637,6 @@ static const utf8 *ttf_process_format_code(rct_drawpixelinfo *dpi, const utf8 *t
|
||||
case FORMAT_MEDIUMFONT:
|
||||
info->font_sprite_base = FONT_SPRITE_BASE_MEDIUM;
|
||||
break;
|
||||
case FORMAT_BIGFONT:
|
||||
info->font_sprite_base = 672;
|
||||
break;
|
||||
case FORMAT_OUTLINE:
|
||||
info->flags |= TEXT_DRAW_FLAG_OUTLINE;
|
||||
break;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "Font.h"
|
||||
#include "TTF.h"
|
||||
|
||||
static constexpr const int32_t SpriteFontLineHeight[] = { 6, 10, 10, 18 };
|
||||
static constexpr const int32_t SpriteFontLineHeight[FONT_SIZE_COUNT] = { 6, 10, 10 };
|
||||
|
||||
static uint8_t _spriteFontCharacterWidths[FONT_SIZE_COUNT * FONT_SPRITE_GLYPH_COUNT];
|
||||
|
||||
@@ -38,7 +38,7 @@ void font_sprite_initialise_characters()
|
||||
if (g1 != nullptr)
|
||||
{
|
||||
int32_t width = g1->width + 2 * g1->x_offset;
|
||||
width += fontSize == FONT_SIZE_BIG ? 1 : -1;
|
||||
width -= 1;
|
||||
if (glyphIndex >= (FORMAT_ARGUMENT_CODE_START - 32) && glyphIndex < (FORMAT_COLOUR_CODE_END - 32)) {
|
||||
width = 0;
|
||||
}
|
||||
@@ -149,8 +149,6 @@ int32_t font_get_size_from_sprite_base(uint16_t spriteBase)
|
||||
default:
|
||||
case FONT_SPRITE_BASE_MEDIUM:
|
||||
return 2;
|
||||
case FONT_SPRITE_BASE_BIG:
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@ enum {
|
||||
FONT_SIZE_TINY = 2,
|
||||
FONT_SIZE_SMALL = 0,
|
||||
FONT_SIZE_MEDIUM = 1,
|
||||
FONT_SIZE_BIG = 3,
|
||||
FONT_SIZE_COUNT = 4
|
||||
FONT_SIZE_COUNT = 3
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -28,7 +27,6 @@ enum {
|
||||
FONT_SPRITE_BASE_TINY = FONT_SIZE_TINY * FONT_SPRITE_GLYPH_COUNT,
|
||||
FONT_SPRITE_BASE_SMALL = FONT_SIZE_SMALL * FONT_SPRITE_GLYPH_COUNT,
|
||||
FONT_SPRITE_BASE_MEDIUM = FONT_SIZE_MEDIUM * FONT_SPRITE_GLYPH_COUNT,
|
||||
FONT_SPRITE_BASE_BIG = FONT_SIZE_BIG * FONT_SPRITE_GLYPH_COUNT
|
||||
};
|
||||
|
||||
#ifndef NO_TTF
|
||||
|
||||
@@ -28,70 +28,60 @@ TTFFontSetDescriptor TTFFontMSGothic = { {
|
||||
{ "msgothic.ttc", "MS PGothic", 9, 1, 1, 9, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "msgothic.ttc", "MS PGothic", 12, 1, 0, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "msgothic.ttc", "MS PGothic", 12, 1, 0, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "msgothic.ttc", "MS PGothic", 13, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontHiragano = { {
|
||||
{ u8"ヒラギノ丸ゴ ProN W4.ttc", "Hiragino Maru Gothic ProN", 9, 1, 1, 9, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"ヒラギノ丸ゴ ProN W4.ttc", "Hiragino Maru Gothic ProN", 11, 1, 0, 13, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"ヒラギノ丸ゴ ProN W4.ttc", "Hiragino Maru Gothic ProN", 11, 1, 0, 13, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"ヒラギノ丸ゴ ProN W4.ttc", "Hiragino Maru Gothic ProN", 12, 1, 0, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontMingLiu = { {
|
||||
{ "msjh.ttc", "JhengHei", 9, -1, -1, 9, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "mingliu.ttc", "MingLiU", 11, 1, 1, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "mingliu.ttc", "MingLiU", 12, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "mingliu.ttc", "MingLiU", 13, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontHeiti = { {
|
||||
{ u8"华文黑体.ttf", "STHeiti", 9, -1, -1, 9, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"华文黑体.ttf", "STHeiti", 11, 1, 1, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"华文黑体.ttf", "STHeiti", 12, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"华文黑体.ttf", "STHeiti", 13, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontSimSun = { {
|
||||
{ "msyh.ttc", "YaHei", 9, -1, -1, 9, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "simsun.ttc", "SimSun", 11, 1, -1, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "simsun.ttc", "SimSun", 12, 1, -2, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "simsun.ttc", "SimSun", 13, 1, 0, 16, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontLiHeiPro = { {
|
||||
{ u8"儷黑 Pro.ttf", "LiHei Pro", 9, 1, -1, 9, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"儷黑 Pro.ttf", "LiHei Pro", 11, 1, 0, 14, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"儷黑 Pro.ttf", "LiHei Pro", 12, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ u8"儷黑 Pro.ttf", "LiHei Pro", 13, 1, 0, 16, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontGulim = { {
|
||||
{ "gulim.ttc", "Gulim", 10, 1, 0, 10, HINTING_DISABLED, nullptr },
|
||||
{ "gulim.ttc", "Gulim", 12, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "gulim.ttc", "Gulim", 12, 1, 0, 15, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
{ "gulim.ttc", "Gulim", 13, 1, 0, 16, HINTING_THRESHOLD_MEDIUM, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontNanum = { {
|
||||
{ "NanumGothic.ttc", "Nanum Gothic", 10, 1, 0, 10, HINTING_DISABLED, nullptr },
|
||||
{ "NanumGothic.ttc", "Nanum Gothic", 12, 1, 0, 15, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "NanumGothic.ttc", "Nanum Gothic", 12, 1, 0, 15, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "NanumGothic.ttc", "Nanum Gothic", 13, 1, 0, 16, HINTING_THRESHOLD_LOW, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontArial = { {
|
||||
{ "arial.ttf", "Arial", 9, 0, -1, 9, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "arial.ttf", "Arial", 10, 0, -1, 12, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "arial.ttf", "Arial", 11, 0, -1, 12, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "arial.ttf", "Arial", 12, 0, -1, 14, HINTING_THRESHOLD_LOW, nullptr },
|
||||
} };
|
||||
|
||||
TTFFontSetDescriptor TTFFontArialUnicode = { {
|
||||
{ "arialuni.ttf", "Arial Unicode MS", 9, 0, -1, 9, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "arialuni.ttf", "Arial Unicode MS", 10, 0, -1, 12, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "arialuni.ttf", "Arial Unicode MS", 11, 0, -1, 12, HINTING_THRESHOLD_LOW, nullptr },
|
||||
{ "arialuni.ttf", "Arial Unicode MS", 12, 0, -1, 14, HINTING_THRESHOLD_LOW, nullptr },
|
||||
} };
|
||||
// clang-format on
|
||||
#endif // NO_TTF
|
||||
@@ -125,8 +115,6 @@ static bool LoadCustomConfigFont(LocalisationService& localisationService)
|
||||
gConfigFonts.height_small, gConfigFonts.hinting_threshold, nullptr },
|
||||
{ gConfigFonts.file_name, gConfigFonts.font_name, gConfigFonts.size_medium, gConfigFonts.x_offset,
|
||||
gConfigFonts.y_offset, gConfigFonts.height_medium, gConfigFonts.hinting_threshold, nullptr },
|
||||
{ gConfigFonts.file_name, gConfigFonts.font_name, gConfigFonts.size_big, gConfigFonts.x_offset, gConfigFonts.y_offset,
|
||||
gConfigFonts.height_big, gConfigFonts.hinting_threshold, nullptr },
|
||||
} };
|
||||
|
||||
ttf_dispose();
|
||||
|
||||
Reference in New Issue
Block a user