+ if (n > 0)
+ {
+ offset.X += getWidthFromCharacter(currentChar);
+ }
+ else if (fallback != 0)
+ {
+ // Let the fallback font draw it, this isn't super efficient but hopefully that doesn't matter
+ wchar_t l1[] = { (wchar_t) currentChar, 0 }, l2 = (wchar_t) previousChar;
+
+ if (visible)
+ {
+ // Apply kerning.
+ offset.X += fallback->getKerningWidth(l1, &l2);
+ offset.Y += fallback->getKerningHeight();
+
+ u32 current_color = iter.getPos();
+ fallback->draw(core::stringw(l1),
+ core::rect<s32>({offset.X-1, offset.Y-1}, position.LowerRightCorner), // ???
+ current_color < colors.size() ? colors[current_color] : video::SColor(255, 255, 255, 255),
+ false, false, clip);
+ }
+
+ offset.X += fallback->getDimension(l1).Width;
+ }