mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Text wrapping bugfixes
This commit is contained in:
@@ -463,12 +463,15 @@ float AtlasWordWrapper::MeasureWidth(std::string_view str) {
|
||||
uint32_t c = utf.next();
|
||||
if (c == '&') {
|
||||
// Skip ampersand prefixes ("&&" is an ampersand.)
|
||||
if (utf.end()) {
|
||||
break;
|
||||
}
|
||||
c = utf.next();
|
||||
}
|
||||
const AtlasChar *ch = atlasfont_.getChar(c);
|
||||
if (!ch)
|
||||
if (!ch) {
|
||||
ch = atlasfont_.getChar('?');
|
||||
|
||||
}
|
||||
w += ch->wx * scale_;
|
||||
}
|
||||
return w;
|
||||
|
||||
Reference in New Issue
Block a user