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

Add sprite font glyph for the guilder sign

This commit is contained in:
Gymnasiast
2018-07-23 23:42:07 +02:00
parent fd133aae8a
commit ad3528a7f1
9 changed files with 40 additions and 3 deletions

View File

@@ -2345,7 +2345,7 @@ STR_2337 :Deutschmark (DM)
STR_2338 :Yen ({YEN})
STR_2339 :Peseta (Pts)
STR_2340 :Lira (L)
STR_2341 :Guilders (fl.)
STR_2341 :Guilders (ƒ)
STR_2342 :Krona (kr)
STR_2343 :Euros ({EURO})
STR_2344 :Imperial

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

View File

@@ -698,6 +698,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/guilder-small.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/ae-uc-bold.png",
"y_offset": 0,
@@ -957,6 +963,12 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/guilder-bold.png",
"y_offset": 0,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/ae-uc-tiny.png",
"y_offset": 0,
@@ -1223,5 +1235,11 @@
"y_offset": 4,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/guilder-tiny.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
}
]

View File

@@ -333,6 +333,13 @@ int32_t font_sprite_get_codepoint_offset(int32_t codepoint)
case FORMAT_GERMAN_SINGLE_OPENQUOTE:
return 12;
case UNICODE_GUILDER_SIGN:
return SPR_G2_GUILDER_SIGN - SPR_CHAR_START;
// This is to catch capitalised versions of the guilder sign
case UNICODE_F_WITH_HOOK_UC:
return 'F' - 32;
default:
if (codepoint < 32 || codepoint >= 256)
codepoint = '?';
@@ -493,6 +500,8 @@ bool font_supports_string_sprite(const utf8* text)
case FORMAT_SINGLE_ENDQUOTE:
case FORMAT_GERMAN_SINGLE_OPENQUOTE:
case UNICODE_GUILDER_SIGN:
supported = true;
break;
default:

View File

@@ -22,7 +22,7 @@ currency_descriptor CurrencyDescriptors[CURRENCY_END] = {
{ "JPY", 1000, CURRENCY_PREFIX, "\xC2\xA5", CURRENCY_SUFFIX, "YEN", STR_YEN }, // Japanese Yen
{ "ESP", 10, CURRENCY_SUFFIX, "Pts", CURRENCY_SUFFIX, "Pts", STR_PESETA }, // Spanish Peseta
{ "ITL", 1000, CURRENCY_PREFIX, "L", CURRENCY_PREFIX, "L", STR_LIRA }, // Italian Lira
{ "NLG", 10, CURRENCY_PREFIX, "\xC6\x92", CURRENCY_PREFIX, "fl.", STR_GUILDERS }, // Dutch Guilder
{ "NLG", 10, CURRENCY_PREFIX, "\xC6\x92 ", CURRENCY_PREFIX, "fl.", STR_GUILDERS }, // Dutch Guilder
{ "SEK", 10, CURRENCY_SUFFIX, " kr", CURRENCY_SUFFIX, " kr", STR_KRONA }, // Swedish Krona
{ "EUR", 10, CURRENCY_PREFIX, "\xE2\x82\xAC", CURRENCY_SUFFIX, "EUR", STR_EUROS }, // Euro
{ "KRW", 10000, CURRENCY_PREFIX, "\xE2\x82\xA9", CURRENCY_PREFIX, "W", STR_WON }, // South Korean Won

View File

@@ -271,4 +271,12 @@ enum UnicodeDingbats
UNICODE_DINGBATS_MINUS = 0x2796,
};
enum UnicodeCurrency
{
UNICODE_GUILDER_SIGN = 402,
// Not a currency sign, but the guilder sign will be capitalised to this.
UNICODE_F_WITH_HOOK_UC = 401,
};
#endif

View File

@@ -896,7 +896,9 @@ enum
SPR_G2_GERMAN_OPENQUOTES = SPR_G2_CHAR_BEGIN + 49,
SPR_G2_CHAR_END = SPR_G2_GERMAN_OPENQUOTES,
SPR_G2_GUILDER_SIGN = SPR_G2_CHAR_BEGIN + 50,
SPR_G2_CHAR_END = SPR_G2_GUILDER_SIGN,
SPR_G2_GLYPH_COUNT = (SPR_G2_CHAR_END - SPR_G2_CHAR_BEGIN) + 1,
// 0x60000, chosen because it's a round hex number