From 6d229eb9d9dc87ba2c0e8d07b1d4db724371527b Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Sun, 6 Feb 2022 21:08:40 +0100 Subject: [PATCH] Add tilde to sprite font --- resources/g2/font/tilde-bold.png | Bin 0 -> 133 bytes resources/g2/font/tilde-small.png | Bin 0 -> 129 bytes resources/g2/font/tilde-tiny.png | Bin 0 -> 122 bytes resources/g2/sprites.json | 18 ++++++++++++++++++ src/openrct2/drawing/Font.cpp | 1 + src/openrct2/localisation/FormatCodes.h | 1 + src/openrct2/sprites.h | 3 ++- 7 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 resources/g2/font/tilde-bold.png create mode 100644 resources/g2/font/tilde-small.png create mode 100644 resources/g2/font/tilde-tiny.png diff --git a/resources/g2/font/tilde-bold.png b/resources/g2/font/tilde-bold.png new file mode 100644 index 0000000000000000000000000000000000000000..8515e33b53e867ca07c0a43d5532b2c4b11c0523 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^oIuRR#0(^JR>p(@DV_kI5ZC|z|93F_|Ig52Z2Z3^ ziq8$Cu)rg-n1O-s2naJy)#j513d(!BIEHXsPkxY;kPwiYlrUpfWkX`!3r4o)*A9%* aYz#J+S<_uU+GYclGI+ZBxvXAvGM 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,