diff --git a/distribution/changelog.txt b/distribution/changelog.txt index fa7a811145..c60ba6feaf 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -6,6 +6,7 @@ - Feature: [#7771] Danish translation. - Feature: [#7802] Add sprite font glyphs for Russian. - Fix: [#3177] Wrong keys displayed in shortcut menu. +- Fix: [#4039] Add sprite font glyph for German opening quotation mark. - Fix: [#7533] Screenshot is incorrectly named/file is not generated in CJK language. - Fix: [#7628] Always-researched items can be modified in the inventory list. - Fix: [#7643] No Money scenarios with funding set to zero. diff --git a/resources/g2/font/german-openquotes-bold.png b/resources/g2/font/german-openquotes-bold.png new file mode 100644 index 0000000000..51fe2cb677 Binary files /dev/null and b/resources/g2/font/german-openquotes-bold.png differ diff --git a/resources/g2/font/german-openquotes-small.png b/resources/g2/font/german-openquotes-small.png new file mode 100644 index 0000000000..4859f1518f Binary files /dev/null and b/resources/g2/font/german-openquotes-small.png differ diff --git a/resources/g2/font/german-openquotes-tiny.png b/resources/g2/font/german-openquotes-tiny.png new file mode 100644 index 0000000000..c1991c7117 Binary files /dev/null and b/resources/g2/font/german-openquotes-tiny.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index 749aff1de3..601e0201f7 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -692,6 +692,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/german-openquotes-small.png", + "y_offset": 6, + "palette": "keep", + "forceBmp": true + }, { "path": "font/ae-uc-bold.png", "y_offset": 0, @@ -945,6 +951,12 @@ "palette": "keep", "forceBmp": true }, + { + "path": "font/german-openquotes-bold.png", + "y_offset": 5, + "palette": "keep", + "forceBmp": true + }, { "path": "font/ae-uc-tiny.png", "y_offset": 0, @@ -1205,5 +1217,11 @@ "y_offset": 1, "palette": "keep", "forceBmp": true + }, + { + "path": "font/german-openquotes-tiny.png", + "y_offset": 4, + "palette": "keep", + "forceBmp": true } ] diff --git a/src/openrct2/drawing/Font.cpp b/src/openrct2/drawing/Font.cpp index a4861ae355..3279e020e4 100644 --- a/src/openrct2/drawing/Font.cpp +++ b/src/openrct2/drawing/Font.cpp @@ -317,12 +317,22 @@ int32_t font_sprite_get_codepoint_offset(int32_t codepoint) case UNICODE_CYRILLIC_YA: return SPR_G2_CYRILLIC_YA_LOWER - SPR_CHAR_START; - // Looks just like Ë. + // Looks just like Ë. case UNICODE_CYRILLIC_IO_UC: return 171; case UNICODE_CYRILLIC_IO: return 203; + case FORMAT_GERMAN_OPENQUOTES: + return SPR_G2_GERMAN_OPENQUOTES - SPR_CHAR_START; + + case FORMAT_SINGLE_OPENQUOTE: + return 64; + case FORMAT_SINGLE_ENDQUOTE: + return 7; + case FORMAT_GERMAN_SINGLE_OPENQUOTE: + return 12; + default: if (codepoint < 32 || codepoint >= 256) codepoint = '?'; @@ -478,6 +488,11 @@ bool font_supports_string_sprite(const utf8* text) case UNICODE_CYRILLIC_IO_UC: case UNICODE_CYRILLIC_IO: + case FORMAT_GERMAN_OPENQUOTES: + case FORMAT_SINGLE_OPENQUOTE: + case FORMAT_SINGLE_ENDQUOTE: + case FORMAT_GERMAN_SINGLE_OPENQUOTE: + supported = true; break; default: diff --git a/src/openrct2/localisation/FormatCodes.cpp b/src/openrct2/localisation/FormatCodes.cpp index 5423ca06f7..9a89667330 100644 --- a/src/openrct2/localisation/FormatCodes.cpp +++ b/src/openrct2/localisation/FormatCodes.cpp @@ -133,6 +133,7 @@ bool utf8_should_use_sprite_for_codepoint(int32_t codepoint) case FORMAT_LEFT: case FORMAT_OPENQUOTES: case FORMAT_ENDQUOTES: + case FORMAT_GERMAN_OPENQUOTES: case UNICODE_DINGBATS_PLUS: case UNICODE_DINGBATS_MINUS: return true; diff --git a/src/openrct2/localisation/FormatCodes.h b/src/openrct2/localisation/FormatCodes.h index 248572dee8..5443702f96 100644 --- a/src/openrct2/localisation/FormatCodes.h +++ b/src/openrct2/localisation/FormatCodes.h @@ -105,8 +105,12 @@ enum FORMAT_RIGHTGUILLEMET = 187, FORMAT_INVERTEDQUESTION = 191, + FORMAT_SINGLE_OPENQUOTE = 8216, + FORMAT_SINGLE_ENDQUOTE = 8217, + FORMAT_GERMAN_SINGLE_OPENQUOTE = 8218, FORMAT_OPENQUOTES = 8220, FORMAT_ENDQUOTES = 8221, + FORMAT_GERMAN_OPENQUOTES = 8222, FORMAT_BULLET = 8226, FORMAT_POWERNEGATIVEONE = 8315, diff --git a/src/openrct2/sprites.h b/src/openrct2/sprites.h index c5077fe80b..bd791b9737 100644 --- a/src/openrct2/sprites.h +++ b/src/openrct2/sprites.h @@ -894,7 +894,9 @@ enum SPR_G2_CYRILLIC_YU_LOWER = SPR_G2_CHAR_BEGIN + 47, SPR_G2_CYRILLIC_YA_LOWER = SPR_G2_CHAR_BEGIN + 48, - SPR_G2_CHAR_END = SPR_G2_CYRILLIC_YA_LOWER, + SPR_G2_GERMAN_OPENQUOTES = SPR_G2_CHAR_BEGIN + 49, + + SPR_G2_CHAR_END = SPR_G2_GERMAN_OPENQUOTES, SPR_G2_GLYPH_COUNT = (SPR_G2_CHAR_END - SPR_G2_CHAR_BEGIN) + 1, // 0x60000, chosen because it's a round hex number