Skip to content

Commit 01c59b9

Browse files
authored
Fix font issues with game titles (#19341)
It fixes certain Japanese characters in game titles and some missing characters in the BPM.
1 parent eb61fc1 commit 01c59b9

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

rpcs3/Emu/RSX/Overlays/overlay_fonts.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ namespace rsx
126126
result.font_names.emplace_back("Roboto-Regular.ttf");
127127
result.font_names.emplace_back("OpenSans-Regular.ttf");
128128
result.font_names.emplace_back("FreeSans.ttf");
129-
#elif !defined(_WIN32)
129+
#elif defined(_WIN32)
130+
// Covers symbol blocks (e.g. Roman numerals) that plain Arial may be missing glyphs for.
131+
result.font_names.emplace_back("tahoma.ttf");
132+
#else
130133
result.font_names.emplace_back("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"); // ubuntu
131134
result.font_names.emplace_back("/usr/share/fonts/TTF/DejaVuSans.ttf"); // arch
132135
#endif
@@ -402,8 +405,9 @@ namespace rsx
402405
result.emplace_back(quad.x0, quad.y1, quad.s0, quad.t1);
403406
result.emplace_back(quad.x1, quad.y1, quad.s1, quad.t1);
404407

405-
// The next word will begin after any whitespaces.
406-
if (is_whitespace)
408+
// The next word will begin after any whitespaces. CJK/Hangul scripts don't use spaces
409+
// between words, so also allow breaking right after each such character.
410+
if (is_whitespace || classify(get_page_id(c)) != language_class::default_)
407411
{
408412
begin_of_word = result.size();
409413
}

0 commit comments

Comments
 (0)