Walnut
Walnut copied to clipboard
Danish Characters are not supported
If I put any danish characters in the title or in text somewhere is does not work. I will show either "?" or some weird characters.
Characters testes are: "æøå"
That's just a C++ thing. You have to input stings and specify UTF-8.
"æøå"
will not work, but
u8"æøå"
will.
@DownLoude no you don't, std::string
supports UTF-8 in C++, so you can just write std::string str = "æøå";
In the case of ImGui, it also supports UTF-8 with just a normal const char*
so it will attempt to render the correct glyphs.
@KnutssonDevelopment the reason why those characters are show up as ? is because the glyphs aren't loaded from the font, or the font doesn't have those glyphs and thus they also weren't loaded.
I haven't thought about how to handle this yet in Walnut; as in, how should we specify which glyphs/character sets/languages we want to load from the font, but I'm open to suggestions.
@TheCherno
or the font doesn't have those glyphs
It does - I installed the Roboto font from Walnut as system font, also in font preview it does seem to have these glyps. Could they be dynamically loaded depending on characters in provided string? If not I would leave it as a setting up to the developer. Symfony is PHP framework but they have nice ecosystem where by default you generate very minimal app and everything else is up to the developer - modules you want to be included. I think it's a nice solution. In fact Walnut .lua scripts remind mea bit of https://github.com/symfony/recipes