mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-04-20 05:06:32 +08:00
waver : fix font loading
This commit is contained in:
@@ -21,14 +21,16 @@
|
|||||||
// ImGui helpers
|
// ImGui helpers
|
||||||
|
|
||||||
bool ImGui_tryLoadFont(const std::string & filename, float size = 14.0f, bool merge = false) {
|
bool ImGui_tryLoadFont(const std::string & filename, float size = 14.0f, bool merge = false) {
|
||||||
std::ifstream f(filename.c_str());
|
std::ifstream f(filename);
|
||||||
if (f.good() == false) {
|
if (f.good() == false) {
|
||||||
|
printf("XXXXXXXXxxx\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (merge) {
|
if (merge) {
|
||||||
ImWchar ranges[] = { 0xf000, 0xf3ff, 0 };
|
// todo : ugly static !!!
|
||||||
|
static ImWchar ranges[] = { 0xf000, 0xf3ff, 0 };
|
||||||
|
static ImFontConfig config;
|
||||||
|
|
||||||
ImFontConfig config;
|
|
||||||
config.MergeMode = true;
|
config.MergeMode = true;
|
||||||
config.GlyphOffset = { 0.0f, 0.0f };
|
config.GlyphOffset = { 0.0f, 0.0f };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user