From 3b97f6d9f6dc592f516a0bd1740aa47e4225df48 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 23 Aug 2018 12:55:31 +0200 Subject: [PATCH] Add y with acute --- resources/g2/font/y-acute-bold.png | Bin 0 -> 184 bytes resources/g2/font/y-acute-small.png | Bin 0 -> 181 bytes resources/g2/font/y-acute-tiny.png | Bin 0 -> 177 bytes resources/g2/font/y-acute-uc-bold.png | Bin 0 -> 187 bytes resources/g2/font/y-acute-uc-small.png | Bin 0 -> 187 bytes resources/g2/font/y-acute-uc-tiny.png | Bin 0 -> 173 bytes resources/g2/sprites.json | 36 ++++++++++++++++++++++++ src/openrct2/drawing/Font.cpp | 6 ++++ src/openrct2/localisation/FormatCodes.h | 2 ++ src/openrct2/sprites.h | 5 +++- 10 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 resources/g2/font/y-acute-bold.png create mode 100644 resources/g2/font/y-acute-small.png create mode 100644 resources/g2/font/y-acute-tiny.png create mode 100644 resources/g2/font/y-acute-uc-bold.png create mode 100644 resources/g2/font/y-acute-uc-small.png create mode 100644 resources/g2/font/y-acute-uc-tiny.png diff --git a/resources/g2/font/y-acute-bold.png b/resources/g2/font/y-acute-bold.png new file mode 100644 index 0000000000000000000000000000000000000000..9c5feb208fc092dd5c2acdbded2a7a0985561b13 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^96-#�(^rK8WyvH~~H(uBp1|9Sr~fGjtdm|8M{M zHwGxqSQ6wH%;50sMjD8d|62z{+s}6VDNPHb6Mw<&;$Uhwld2A literal 0 HcmV?d00001 diff --git a/resources/g2/font/y-acute-small.png b/resources/g2/font/y-acute-small.png new file mode 100644 index 0000000000000000000000000000000000000000..d4a6948427c14b4da8b157ffaad9a3c19828468f GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)T#0(_Q{j0YIQak}ZA+D*q=^YIJ|1)$L8~<_!@hljQC0!qCAg>jC6&7I;J!15FVIVMc~ob0mO*>?NMQuI!IE z#JS8&ciem82NY8Bba4#fxSpJlkr3dOFvGe%@tX|WRwjW*HVjU$codEtW?*P+VC(iR SNU{K`X7F_Nb6Mw<&;$UE_%F!- literal 0 HcmV?d00001 diff --git a/resources/g2/font/y-acute-tiny.png b/resources/g2/font/y-acute-tiny.png new file mode 100644 index 0000000000000000000000000000000000000000..30d7ee5a43ef5a2b49536c6a2cbf2ae57bdbd61e GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^tU%1c#0(^T=HFcbq<8{+LR?dI(>oac|7YkhHvZrK z_iqePoUtUxFPOpM*^M+1C&}C0g`tC0)&t1lEbxddW?FthZz{`C0UzXcTZ&p Ps$}qV^>bP0l+XkKiyJL| literal 0 HcmV?d00001 diff --git a/resources/g2/font/y-acute-uc-bold.png b/resources/g2/font/y-acute-uc-bold.png new file mode 100644 index 0000000000000000000000000000000000000000..9a8f78294fedaef89aa05148533228960c7e7cd2 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2hGm!icqpk;}cmjMvTvK(^I~e}|XXr3C{@?!h zZwyeJu_VYZn8D%MjWiG^$=lt9p@UV{1IXbl@Q5sCVBi)8VMc~ob0mO*>?NMQuI!IE z#JNmOCx71F3l!4uba4#fxSpKwAR*yGKz70mv&{{OuP!mMUA@4}Gv^@>kB=e8nGcPO Z49ga>ABnOO$pz|R@O1TaS?83{1OS}#GmiiO literal 0 HcmV?d00001 diff --git a/resources/g2/font/y-acute-uc-small.png b/resources/g2/font/y-acute-uc-small.png new file mode 100644 index 0000000000000000000000000000000000000000..8364c106b75563b5c197e5ed297b851450589542 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^oIuRQ#0(^*v*+jnDV_kI5Z6@Q^bUsq{~0=rjsLg* z{Tl-mXDkWw3ubV5b|VeMN%D4gVd!9$^#F1>3p^r=85p>QL70(Y)*K0-AbW|YuPgf_ z4skANg|C`XUO*uYPZ!4!j_b(@0SO5KGmalHSpSLPaL;6Ri7V5L4GNAK7#N5u7#wC~ YW7y))A^-g6ERZn_p00i_>zopr0PIpQ@Bjb+ literal 0 HcmV?d00001 diff --git a/resources/g2/font/y-acute-uc-tiny.png b/resources/g2/font/y-acute-uc-tiny.png new file mode 100644 index 0000000000000000000000000000000000000000..fbf95955e481890346f7449f727fea4d8a325b8d GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0vp^tU%1c#0(^T=HFcbq<8{+LR?dI(>oac|7YkhHvZrK z_iqePoUtUxFPOpM*^M+1C&}C0g`tC0)&t1lEbxddW?bP0l+XkK&`>Pn literal 0 HcmV?d00001 diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 3a9e046575..30a8ba031a 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -782,6 +782,18 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/y-acute-uc-small.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/y-acute-small.png", + "y_offset": 1, + "palette": "keep", + "forceBmp": true + }, { "path": "font/ae-uc-bold.png", "y_offset": 0, @@ -1125,6 +1137,18 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/y-acute-uc-bold.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/y-acute-bold.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, { "path": "font/ae-uc-tiny.png", "y_offset": 0, @@ -1475,5 +1499,17 @@ "y_offset": 0, "palette": "keep", "forceBmp": true + }, + { + "path": "font/y-acute-uc-tiny.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/y-acute-tiny.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true } ] diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index 58e16196d8..09e277214b 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -380,6 +380,10 @@ int32_t font_sprite_get_codepoint_offset(int32_t codepoint) return SPR_G2_C_CARON_UPPER - SPR_CHAR_START; case UNICODE_C_CARON: return SPR_G2_C_CARON_LOWER - SPR_CHAR_START; + case UNICODE_Y_ACUTE_UC: + return SPR_G2_Y_ACUTE_UPPER - SPR_CHAR_START; + case UNICODE_Y_ACUTE: + return SPR_G2_Y_ACUTE_LOWER - SPR_CHAR_START; default: if (codepoint < 32 || codepoint >= 256) @@ -562,6 +566,8 @@ bool font_supports_string_sprite(const utf8* text) case UNICODE_C_CARON_UC: case UNICODE_C_CARON: + case UNICODE_Y_ACUTE_UC: + case UNICODE_Y_ACUTE: supported = true; break; diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index cb1596cf6f..702a302c53 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -313,6 +313,8 @@ enum UnicodeCzech { UNICODE_C_CARON_UC = 268, UNICODE_C_CARON = 269, + UNICODE_Y_ACUTE_UC = 221, + UNICODE_Y_ACUTE = 253, }; #endif diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index e4f8db66df..9110a9858b 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -916,7 +916,10 @@ enum SPR_G2_C_CARON_UPPER = SPR_G2_CHAR_BEGIN + 62, SPR_G2_C_CARON_LOWER = SPR_G2_CHAR_BEGIN + 63, - SPR_G2_CHAR_END = SPR_G2_C_CARON_LOWER, + SPR_G2_Y_ACUTE_UPPER = SPR_G2_CHAR_BEGIN + 64, + SPR_G2_Y_ACUTE_LOWER = SPR_G2_CHAR_BEGIN + 65, + + SPR_G2_CHAR_END = SPR_G2_Y_ACUTE_LOWER, SPR_G2_GLYPH_COUNT = (SPR_G2_CHAR_END - SPR_G2_CHAR_BEGIN) + 1, // 0x60000, chosen because it's a round hex number