I am using wxWidgets with Visual Studio 2022 (C++) to develop Windows application. I wish to display in the window, but as I tried using various fonts with the following code:
std::string fonts_name[8] = {"Calibri Light", "Calibri", "Cambria Math", "Cambria", "Candara Light", "Candara", "Consolas", "DFKai-SB"};
// ...
stat_txt_test = new wxStaticText*[8];
for (long long i = 0; i != 8; ++i) {
stat_txt_test[i] = new wxStaticText(this, (long long)1000 + i, "", wxPoint(i * 15, i * 15), wxSize(10, 10), wxTE_READONLY);
stat_txt_test[i]->SetFont(fonts[i]);
}
However, if I use "a" (ascii character) instead, the result is
, which is as expected.
Now I am guessing that UTF-16 does not work well in my code. However, Chinese characters worked very well. This is the unicode of .
How should I modify my code in order to get this job done?
My attempts
"\x1D465" does not work and I got the following message and failure to build:
error C2022: '119909': too big for character"\xD835\xDC65"does not work (just a wild guess to use two characters to represent this character).
Any help will be appreciated. Thank you!
