diff --git a/resources/g2/font/tilde-bold.png b/resources/g2/font/tilde-bold.png new file mode 100644 index 0000000000..8515e33b53 Binary files /dev/null and b/resources/g2/font/tilde-bold.png differ diff --git a/resources/g2/font/tilde-small.png b/resources/g2/font/tilde-small.png new file mode 100644 index 0000000000..b2126e7667 Binary files /dev/null and b/resources/g2/font/tilde-small.png differ diff --git a/resources/g2/font/tilde-tiny.png b/resources/g2/font/tilde-tiny.png new file mode 100644 index 0000000000..cca433abeb Binary files /dev/null and b/resources/g2/font/tilde-tiny.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 393b13da8b..8b41b622c5 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -1095,6 +1095,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/tilde-small.png", + "y_offset": 3, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/ae-uc-bold.png", "y_offset": 0, @@ -1688,6 +1694,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/tilde-bold.png", + "y_offset": 2, + "palette": "keep", + "forceBmp": true + }, { "path": "font/latin/ae-uc-tiny.png", "y_offset": 0, @@ -2288,6 +2300,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/tilde-tiny.png", + "y_offset": 1, + "palette": "keep", + "forceBmp": true + }, { "path": "support/flat_to_steep_1_1.png", "x_offset": -32, diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index 42e319f62f..604398c0b8 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -183,6 +183,7 @@ static const std::unordered_map codepointOffsetMap = { { UnicodeChar::left_brace, SPR_G2_LEFT_BRACE - SPR_CHAR_START }, { UnicodeChar::vertical_bar, SPR_G2_VERTICAL_BAR - SPR_CHAR_START }, { UnicodeChar::right_brace, SPR_G2_RIGHT_BRACE - SPR_CHAR_START }, + { UnicodeChar::tilde, SPR_G2_TILDE - SPR_CHAR_START }, { UnicodeChar::non_breaking_space, ' ' - CS_SPRITE_FONT_OFFSET }, { UnicodeChar::interpunct, SPR_G2_INTERPUNCT - SPR_CHAR_START }, { UnicodeChar::multiplication_sign, CSChar::cross - CS_SPRITE_FONT_OFFSET }, diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index 70e5b28c1b..7b84e44e21 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -281,6 +281,7 @@ namespace UnicodeChar constexpr char32_t left_brace = 0x7B; constexpr char32_t vertical_bar = 0x7C; constexpr char32_t right_brace = 0x7D; + constexpr char32_t tilde = 0x7E; constexpr char32_t non_breaking_space = 0xA0; constexpr char32_t leftguillemet = 0xAB; constexpr char32_t rightguillemet = 0xBB; diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index 3bee51ce40..5e8715991f 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -1014,8 +1014,9 @@ enum SPR_G2_LEFT_BRACE, SPR_G2_VERTICAL_BAR, SPR_G2_RIGHT_BRACE, + SPR_G2_TILDE, - SPR_G2_GLYPH_COUNT = (SPR_G2_RIGHT_BRACE - SPR_G2_CHAR_BEGIN) + 1, + SPR_G2_GLYPH_COUNT = (SPR_G2_TILDE - SPR_G2_CHAR_BEGIN) + 1, SPR_G2_CHAR_END = SPR_G2_CHAR_BEGIN + SPR_G2_GLYPH_COUNT * 3, SPR_G2_SUPPORT_BEGIN = SPR_G2_CHAR_END,