Hello again. Implemented UTF8 support for LE4. Works fine?.
context->SetBlendMode(Blend::Alpha);
context->DrawText(u8"Привет мир! Hello world!", 25.0f, 25.0f);
context->SetBlendMode(Blend::Solid);
Add yours symbols to "familychars" and make own "family" in Font.cpp
if (family==Font::English)
{
familychars = L"abcdefghijklmnopqrstuvwxyzабвгдеёжзийклмнопрстуфхцчшщъыьэюя АБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!@#$%^&*()_+[]\\{}|;':\",./<>? `~";
}
Update:
#include <codecvt>
std::string WideStringToString(const std::wstring & str)
{
std::wstring_convert<std::codecvt_utf8<wchar_t>> myconv;
return myconv.to_bytes(str);
}
std::wstring StringToWideString(const std::string & str)
{
std::wstring_convert<std::codecvt_utf8<wchar_t>> convert;
return convert.from_bytes(str);
}
Gud luck?️!
FontSrc.zip