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

Merge pull request #7664 from AaronVanGeffen/bugfix/spinner_dingbats

Use unicode dingbats for +/- buttons in CJK languages
This commit is contained in:
Michael Steenbeek
2018-06-11 23:10:54 +02:00
committed by GitHub
3 changed files with 19 additions and 0 deletions

View File

@@ -112,6 +112,12 @@ sint32 font_sprite_get_codepoint_offset(sint32 codepoint)
case UNICODE_Z_DOT: return RCT2_Z_DOT - 32;
case UNICODE_Z_ACUTE: return RCT2_Z_ACUTE - 32;
// Render capital sharp-S (ẞ) with lowercase sprite (ß)
case UNICODE_CAPITAL_SHARP_S: return 223 - 32;
case UNICODE_DINGBATS_PLUS: return 11;
case UNICODE_DINGBATS_MINUS: return 13;
default:
if (codepoint < 32 || codepoint >= 256) codepoint = '?';
return codepoint - 32;

View File

@@ -137,6 +137,8 @@ bool utf8_should_use_sprite_for_codepoint(sint32 codepoint)
case FORMAT_LEFT:
case FORMAT_OPENQUOTES:
case FORMAT_ENDQUOTES:
case UNICODE_DINGBATS_PLUS:
case UNICODE_DINGBATS_MINUS:
return true;
default:
return false;

View File

@@ -181,4 +181,15 @@ enum UnicodePolish
UNICODE_Z_ACUTE = 378,
};
enum UnicodeGerman
{
UNICODE_CAPITAL_SHARP_S = 0x1E9E,
};
enum UnicodeDingbats
{
UNICODE_DINGBATS_PLUS = 0x2795,
UNICODE_DINGBATS_MINUS = 0x2796,
};
#endif