mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-31 18:53:03 +00:00
UI: Measure text with & in it properly.
This commit is contained in:
parent
53cc4524b1
commit
da7a42a957
@ -349,7 +349,12 @@ protected:
|
||||
float AtlasWordWrapper::MeasureWidth(const char *str, size_t bytes) {
|
||||
float w = 0.0f;
|
||||
for (UTF8 utf(str); utf.byteIndex() < (int)bytes; ) {
|
||||
const AtlasChar *ch = atlasfont_.getChar(utf.next());
|
||||
uint32_t c = utf.next();
|
||||
if (c == '&') {
|
||||
// Skip ampersand prefixes ("&&" is an ampersand.)
|
||||
c = utf.next();
|
||||
}
|
||||
const AtlasChar *ch = atlasfont_.getChar(c);
|
||||
if (!ch)
|
||||
ch = atlasfont_.getChar('?');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user