Skip to content

Commit 41162cc

Browse files
authored
Fix: bad kerning on lowercase 'j' character (original bug)
1 parent 8217acd commit 41162cc

File tree

8 files changed

+25
-1
lines changed

8 files changed

+25
-1
lines changed

distribution/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
- Fix: [#12285] On-ride photo profit assumes every guest buys one.
5454
- Fix: [#12297] OpenGL renderer causing artifacts.
5555
- Fix: [#12312] Softlock when loading save file via command line fails.
56+
- Fix: 'j' character has broken kerning (original bug).
5657
- Fix: RCT1 scenarios have more items in the object list than are present in the park or the research list.
5758
- Improved: [#6530] Allow water and land height changes on park borders.
5859
- Improved: [#11390] Build hash written to screenshot metadata.

resources/g2/font/latin/j-bold.png

2.61 KB
Loading
2.68 KB
Loading

resources/g2/font/latin/j-tiny.png

1.46 KB
Loading

resources/g2/sprites.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,12 @@
958958
"palette": "keep",
959959
"forceBmp": true
960960
},
961+
{
962+
"path": "font/latin/j-small.png",
963+
"x_offset": -1,
964+
"palette": "keep",
965+
"forceBmp": true
966+
},
961967
{
962968
"path": "font/latin/ae-uc-bold.png",
963969
"y_offset": 0,
@@ -1439,6 +1445,12 @@
14391445
"palette": "keep",
14401446
"forceBmp": true
14411447
},
1448+
{
1449+
"path": "font/latin/j-bold.png",
1450+
"x_offset": -1,
1451+
"palette": "keep",
1452+
"forceBmp": true
1453+
},
14421454
{
14431455
"path": "font/latin/ae-uc-tiny.png",
14441456
"y_offset": 0,
@@ -1927,5 +1939,11 @@
19271939
"y_offset": 0,
19281940
"palette": "keep",
19291941
"forceBmp": true
1942+
},
1943+
{
1944+
"path": "font/latin/j-tiny.png",
1945+
"x_offset": 0,
1946+
"palette": "keep",
1947+
"forceBmp": true
19301948
}
19311949
]

src/openrct2/drawing/Font.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ static const std::unordered_map<char32_t, int32_t> codepointOffsetMap = {
5353
{ UnicodeChar::g_breve, SPR_G2_G_BREVE_LOWER - SPR_CHAR_START },
5454
{ UnicodeChar::i_with_dot_uc, SPR_G2_I_WITH_DOT_UPPER - SPR_CHAR_START },
5555
{ UnicodeChar::i_without_dot, SPR_G2_I_WITHOUT_DOT_LOWER - SPR_CHAR_START },
56+
{ UnicodeChar::j, SPR_G2_J - SPR_CHAR_START },
5657
{ UnicodeChar::l_stroke_uc, CSChar::l_stroke_uc - CS_SPRITE_FONT_OFFSET },
5758
{ UnicodeChar::l_stroke, CSChar::l_stroke - CS_SPRITE_FONT_OFFSET },
5859
{ UnicodeChar::n_acute_uc, CSChar::n_acute_uc - CS_SPRITE_FONT_OFFSET },

src/openrct2/localisation/FormatCodes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ namespace CSChar
145145
namespace UnicodeChar
146146
{
147147
// Latin alphabet
148+
constexpr char32_t j = 0x6A;
148149
constexpr char32_t ae_uc = 0xC6;
149150
constexpr char32_t o_stroke_uc = 0xD8;
150151
constexpr char32_t y_acute_uc = 0xDD;

src/openrct2/sprites.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,10 @@ enum
965965
SPR_G2_Z_CARON_LOWER = SPR_G2_CHAR_BEGIN + 85,
966966

967967
SPR_G2_ROUBLE_SIGN = SPR_G2_CHAR_BEGIN + 86,
968-
SPR_G2_GLYPH_COUNT = (SPR_G2_ROUBLE_SIGN - SPR_G2_CHAR_BEGIN) + 1,
968+
969+
SPR_G2_J = SPR_G2_CHAR_BEGIN + 87,
970+
971+
SPR_G2_GLYPH_COUNT = (SPR_G2_J - SPR_G2_CHAR_BEGIN) + 1,
969972
SPR_G2_CHAR_END = SPR_G2_CHAR_BEGIN + SPR_G2_GLYPH_COUNT * 3,
970973
SPR_G2_END = SPR_G2_CHAR_END,
971974

0 commit comments

Comments
 (0)