diff --git a/libs/ui/source/kerned_font.cpp b/libs/ui/source/kerned_font.cpp index 41247016..3a983cef 100644 --- a/libs/ui/source/kerned_font.cpp +++ b/libs/ui/source/kerned_font.cpp @@ -60,10 +60,15 @@ namespace psemek::ui geom::vector pos{0.f, (size_[1] - baseline_offset_) * options.scale}; for (char32_t c : util::utf8_range(str)) { - if (!supports_character(c)) - c = unknown; + char32_t cc = c; - auto const & data = glyphs_.at(c); + if (!supports_character(c)) + cc = unknown; + + if (std::isspace(c)) + cc = ' '; + + auto const & data = glyphs_.at(cc); glyph g; g.character = c;