diff --git a/distribution/changelog.txt b/distribution/changelog.txt index f11e482ba0..5c2efadfd1 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -4,7 +4,7 @@ - Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks. - Feature: [#7694] Debug option to visualize paths that the game detects as wide. - Feature: [#7771] Danish translation. -- Feature: [#7797, #7802, #7821] Add sprite font glyphs for Danish, Norwegian, Russian, Turkish and Catalan. +- Feature: [#7797, #7802, #7821, #7830] Add sprite font glyphs for Danish, Norwegian, Russian, Turkish, Catalan and Romanian. - Fix: [#3177] Wrong keys displayed in shortcut menu. - Fix: [#4039] No sprite font glyph for German opening quotation mark. - Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language. diff --git a/resources/g2/font/a-breve-uc-bold.png b/resources/g2/font/a-breve-uc-bold.png new file mode 100644 index 0000000000..ead8f46367 Binary files /dev/null and b/resources/g2/font/a-breve-uc-bold.png differ diff --git a/resources/g2/font/a-breve-uc-small.png b/resources/g2/font/a-breve-uc-small.png new file mode 100644 index 0000000000..7d6cb9aac4 Binary files /dev/null and b/resources/g2/font/a-breve-uc-small.png differ diff --git a/resources/g2/font/a-breve-uc-tiny.png b/resources/g2/font/a-breve-uc-tiny.png new file mode 100644 index 0000000000..1ffa9dfba4 Binary files /dev/null and b/resources/g2/font/a-breve-uc-tiny.png differ diff --git a/resources/g2/font/t-comma-bold.png b/resources/g2/font/t-comma-bold.png new file mode 100644 index 0000000000..9b352edd6b Binary files /dev/null and b/resources/g2/font/t-comma-bold.png differ diff --git a/resources/g2/font/t-comma-small.png b/resources/g2/font/t-comma-small.png new file mode 100644 index 0000000000..6c5af8883b Binary files /dev/null and b/resources/g2/font/t-comma-small.png differ diff --git a/resources/g2/font/t-comma-tiny.png b/resources/g2/font/t-comma-tiny.png new file mode 100644 index 0000000000..f74c26bc6e Binary files /dev/null and b/resources/g2/font/t-comma-tiny.png differ diff --git a/resources/g2/font/t-comma-uc-bold.png b/resources/g2/font/t-comma-uc-bold.png new file mode 100644 index 0000000000..e3b9538aa2 Binary files /dev/null and b/resources/g2/font/t-comma-uc-bold.png differ diff --git a/resources/g2/font/t-comma-uc-small.png b/resources/g2/font/t-comma-uc-small.png new file mode 100644 index 0000000000..89c3e00fc6 Binary files /dev/null and b/resources/g2/font/t-comma-uc-small.png differ diff --git a/resources/g2/font/t-comma-uc-tiny.png b/resources/g2/font/t-comma-uc-tiny.png new file mode 100644 index 0000000000..73de1fbe33 Binary files /dev/null and b/resources/g2/font/t-comma-uc-tiny.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index fc40afc72e..6aa452ace1 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -746,6 +746,24 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/a-breve-uc-small.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/t-comma-uc-small.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/t-comma-small.png", + "y_offset": 1, + "palette": "keep", + "forceBmp": true + }, { "path": "font/ae-uc-bold.png", "y_offset": 0, @@ -1053,6 +1071,24 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/a-breve-uc-bold.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/t-comma-uc-bold.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/t-comma-bold.png", + "y_offset": 1, + "palette": "keep", + "forceBmp": true + }, { "path": "font/ae-uc-tiny.png", "y_offset": 0, @@ -1367,5 +1403,23 @@ "y_offset": 2, "palette": "keep", "forceBmp": true + }, + { + "path": "font/a-breve-uc-tiny.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/t-comma-uc-tiny.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true + }, + { + "path": "font/t-comma-tiny.png", + "y_offset": 0, + "palette": "keep", + "forceBmp": true } ] diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index aa32206de3..b89c4d30eb 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -353,6 +353,22 @@ int32_t font_sprite_get_codepoint_offset(int32_t codepoint) case UNICODE_INTERPUNCT: return SPR_G2_INTERPUNCT - SPR_CHAR_START; + // Romanian + case UNICODE_A_BREVE_UC: + return SPR_G2_A_BREVE_UPPER - SPR_CHAR_START; + case UNICODE_A_BREVE: + // Render as รข, there is no visual difference on this scale. + return 194; + case UNICODE_S_COMMA_UC: + // Also no visual difference. + return SPR_G2_S_CEDILLA_UPPER - SPR_CHAR_START; + case UNICODE_S_COMMA: + return SPR_G2_S_CEDILLA_LOWER - SPR_CHAR_START; + case UNICODE_T_COMMA_UC: + return SPR_G2_T_COMMA_UPPER - SPR_CHAR_START; + case UNICODE_T_COMMA: + return SPR_G2_T_COMMA_LOWER - SPR_CHAR_START; + // This is to catch capitalised versions of the guilder sign case UNICODE_F_WITH_HOOK_UC: return 'F' - 32; @@ -528,6 +544,13 @@ bool font_supports_string_sprite(const utf8* text) case UNICODE_INTERPUNCT: + case UNICODE_A_BREVE_UC: + case UNICODE_A_BREVE: + case UNICODE_S_COMMA_UC: + case UNICODE_S_COMMA: + case UNICODE_T_COMMA_UC: + case UNICODE_T_COMMA: + supported = true; break; default: diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index bd2f997360..1b9d2c6e18 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -280,6 +280,16 @@ enum UnicodeTurkish UNICODE_S_CEDILLA = 351, }; +enum UnicodeRomanian +{ + UNICODE_A_BREVE_UC = 258, + UNICODE_A_BREVE = 259, + UNICODE_S_COMMA_UC = 536, + UNICODE_S_COMMA = 537, + UNICODE_T_COMMA_UC = 538, + UNICODE_T_COMMA = 539, +}; + enum UnicodeDingbats { UNICODE_DINGBATS_PLUS = 0x2795, diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index c496b15e4d..d3718965be 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -907,7 +907,11 @@ enum SPR_G2_INTERPUNCT = SPR_G2_CHAR_BEGIN + 57, - SPR_G2_CHAR_END = SPR_G2_INTERPUNCT, + SPR_G2_A_BREVE_UPPER = SPR_G2_CHAR_BEGIN + 58, + SPR_G2_T_COMMA_UPPER = SPR_G2_CHAR_BEGIN + 59, + SPR_G2_T_COMMA_LOWER = SPR_G2_CHAR_BEGIN + 60, + + SPR_G2_CHAR_END = SPR_G2_T_COMMA_LOWER, SPR_G2_GLYPH_COUNT = (SPR_G2_CHAR_END - SPR_G2_CHAR_BEGIN) + 1, // 0x60000, chosen because it's a round hex number