1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Fix #7830: Add font sprites for Romanian characters

This commit is contained in:
Michael Steenbeek
2018-07-30 17:54:02 +02:00
committed by GitHub
parent 1d5c20d98a
commit fdd18dd29b
14 changed files with 93 additions and 2 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

View File

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

View File

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

View File

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

View File

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