Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing Ukrainian letters (Єє and Ґґ) #20410

Merged
merged 3 commits into from
Jun 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Feature: [#15660] Ability to show window buttons on the left.
- Feature: [OpenMusic#41] Official Title Theme by Allister Brimble.
- Improved: [#20119, #20243] Add new colour presets to several roller coasters (using the new colours).
- Improved: [#20393] Add Cyrillic characters Ѕѕ, Іі, Її, and Јј to the sprite font.
- Improved: [#20393, #20410] Add Cyrillic characters Ґґ, Ѕѕ, Єє, Іі, Її, and Јј to the sprite font.
- Change: [#20110] Fix a few RCT1 build height parity discrepancies.
- Fix: [#6152] Camera and UI are no longer locked at 40 Hz, providing a smoother experience.
- Fix: [#19823] Parkobj: disallow overriding objects of different object types.
Expand Down
Binary file added resources/g2/font/cyrillic/U1028-bold.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1028-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1028-tiny.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1108-bold.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1108-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1108-tiny.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1168-bold.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1168-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1168-tiny.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1169-bold.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1169-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/g2/font/cyrillic/U1169-tiny.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions resources/g2/sprites.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,11 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1028-small.png",
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1041-small.png",
"palette": "keep",
Expand Down Expand Up @@ -829,6 +834,23 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1108-small.png",
"y_offset": 2,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1168-small.png",
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1169-small.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/german-openquotes-small.png",
"y_offset": 6,
Expand Down Expand Up @@ -1231,6 +1253,11 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1028-bold.png",
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1041-bold.png",
"palette": "keep",
Expand Down Expand Up @@ -1458,6 +1485,23 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1108-bold.png",
"y_offset": 2,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1168-bold.png",
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1169-bold.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/german-openquotes-bold.png",
"y_offset": 5,
Expand Down Expand Up @@ -1859,6 +1903,11 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1028-tiny.png",
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1041-tiny.png",
"palette": "keep",
Expand Down Expand Up @@ -1976,6 +2025,7 @@
},
{
"path": "font/cyrillic/U1075-tiny.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
},
Expand Down Expand Up @@ -2096,6 +2146,23 @@
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1108-tiny.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1168-tiny.png",
"palette": "keep",
"forceBmp": true
},
{
"path": "font/cyrillic/U1169-tiny.png",
"y_offset": 1,
"palette": "keep",
"forceBmp": true
},
{
"path": "font/german-openquotes-tiny.png",
"y_offset": 4,
Expand Down
6 changes: 5 additions & 1 deletion src/openrct2/drawing/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static const std::unordered_map<char32_t, int32_t> codepointOffsetMap = {

// Cyrillic alphabet
{ UnicodeChar::cyrillic_io_uc, 203 - CS_SPRITE_FONT_OFFSET }, // Looks just like Ë
{ UnicodeChar::cyrillic_ukrainian_ie_uc, SPR_G2_CYRILLIC_UKRAINIAN_IE_UPPER - SPR_CHAR_START },
{ UnicodeChar::cyrillic_dze_uc, 'S' - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::cyrillic_dotted_i_uc, 'I' - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::cyrillic_yi_uc, 207 - CS_SPRITE_FONT_OFFSET }, // Looks just like Ï
Expand Down Expand Up @@ -186,11 +187,14 @@ static const std::unordered_map<char32_t, int32_t> codepointOffsetMap = {
{ UnicodeChar::cyrillic_e, SPR_G2_CYRILLIC_E_LOWER - SPR_CHAR_START },
{ UnicodeChar::cyrillic_yu, SPR_G2_CYRILLIC_YU_LOWER - SPR_CHAR_START },
{ UnicodeChar::cyrillic_ya, SPR_G2_CYRILLIC_YA_LOWER - SPR_CHAR_START },
{ UnicodeChar::cyrillic_io, 235 - CS_SPRITE_FONT_OFFSET }, // Looks just like ë
{ UnicodeChar::cyrillic_io, 235 - CS_SPRITE_FONT_OFFSET }, // Looks just like ë
{ UnicodeChar::cyrillic_ukrainian_ie, SPR_G2_CYRILLIC_UKRAINIAN_IE_LOWER - SPR_CHAR_START }, // Looks just like ë
{ UnicodeChar::cyrillic_dze, 's' - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::cyrillic_dotted_i, 'i' - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::cyrillic_yi, 239 - CS_SPRITE_FONT_OFFSET }, // Looks just like ï
{ UnicodeChar::cyrillic_je, 'j' - CS_SPRITE_FONT_OFFSET },
{ UnicodeChar::cyrillic_ghe_upturn_uc, SPR_G2_CYRILLIC_GHE_UPTURN_UPPER - SPR_CHAR_START },
{ UnicodeChar::cyrillic_ghe_upturn, SPR_G2_CYRILLIC_GHE_UPTURN_LOWER - SPR_CHAR_START },

// Punctuation
{ UnicodeChar::left_brace, SPR_G2_LEFT_BRACE - SPR_CHAR_START },
Expand Down
5 changes: 5 additions & 0 deletions src/openrct2/localisation/FormatCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ namespace UnicodeChar

// Cyrillic alphabet
constexpr char32_t cyrillic_io_uc = 0x401;
constexpr char32_t cyrillic_ukrainian_ie_uc = 0x404;
constexpr char32_t cyrillic_dze_uc = 0x0405;
constexpr char32_t cyrillic_dotted_i_uc = 0x0406;
constexpr char32_t cyrillic_yi_uc = 0x0407;
Expand Down Expand Up @@ -284,11 +285,15 @@ namespace UnicodeChar
constexpr char32_t cyrillic_ya = 0x44F;

constexpr char32_t cyrillic_io = 0x451;
constexpr char32_t cyrillic_ukrainian_ie = 0x454;
constexpr char32_t cyrillic_dze = 0x0455;
constexpr char32_t cyrillic_dotted_i = 0x0456;
constexpr char32_t cyrillic_yi = 0x0457;
constexpr char32_t cyrillic_je = 0x0458;

constexpr char32_t cyrillic_ghe_upturn_uc = 0x490;
constexpr char32_t cyrillic_ghe_upturn = 0x491;

// Punctuation
constexpr char32_t left_brace = 0x7B;
constexpr char32_t vertical_bar = 0x7C;
Expand Down
4 changes: 4 additions & 0 deletions src/openrct2/sprites.h
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ enum
SPR_G2_O_STROKE_UPPER,
SPR_G2_O_STROKE_LOWER,

SPR_G2_CYRILLIC_UKRAINIAN_IE_UPPER,
SPR_G2_CYRILLIC_BE_UPPER,
SPR_G2_CYRILLIC_GHE_UPPER,
SPR_G2_CYRILLIC_DE_UPPER,
Expand Down Expand Up @@ -1089,6 +1090,9 @@ enum
SPR_G2_CYRILLIC_E_LOWER,
SPR_G2_CYRILLIC_YU_LOWER,
SPR_G2_CYRILLIC_YA_LOWER,
SPR_G2_CYRILLIC_UKRAINIAN_IE_LOWER,
SPR_G2_CYRILLIC_GHE_UPTURN_UPPER,
SPR_G2_CYRILLIC_GHE_UPTURN_LOWER,

SPR_G2_GERMAN_OPENQUOTES,

Expand Down