Failsafe for non-Ansi chars (for now).
This commit is contained in:
parent
d42ab3a258
commit
773d86ffd3
@ -81,7 +81,7 @@ void UIApp::init(const AppInitArgs& args)
|
|||||||
const unsigned posY = 100;
|
const unsigned posY = 100;
|
||||||
for (const char chr : std::string_view("Dies ist ein Test-Text!"))
|
for (const char chr : std::string_view("Dies ist ein Test-Text!"))
|
||||||
{
|
{
|
||||||
const UVFontMapEntry& entry = uvFontMap.entries[chr];
|
const UVFontMapEntry& entry = uvFontMap.entries[chr < 0 ? '_' : chr];
|
||||||
const UIVertex topLeft = {
|
const UIVertex topLeft = {
|
||||||
.pos = {posX + entry.xOffset, posY + entry.yOffset},
|
.pos = {posX + entry.xOffset, posY + entry.yOffset},
|
||||||
.texcoord = {entry.uvX, entry.uvY}
|
.texcoord = {entry.uvX, entry.uvY}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user