Merge pull request #7664 from AaronVanGeffen/bugfix/spinner_dingbats

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

No files matched your search

+6
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;
@@ -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;
+11
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