1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 03:05:24 +01:00

Fix #4039: Add sprite font glyph for German opening quotes (#7811)

This commit is contained in:
Michael Steenbeek
2018-07-23 22:02:28 +02:00
committed by GitHub
parent a89121a37b
commit fd133aae8a
9 changed files with 43 additions and 2 deletions

View File

@@ -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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

View File

@@ -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
}
]

View File

@@ -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:

View File

@@ -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;

View File

@@ -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,

View File

@@ -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