Closed Youxikong closed 7 months ago
It is supported in implay, but dropped in this plugin. I don't think it's a big problem as a developer tool.
imgui doesn't support dynamic font texture yet, loading a cjk font will eat a lot of memory.
It's supported in the latest build.
~~/script-opts/debug.conf
font-path=C:/Windows/Fonts/msyh.ttc
font-size=13
It's supported in the latest build.
~~/script-opts/debug.conf
font-path=C:/Windows/Fonts/msyh.ttc font-size=13
Can you support releative path like ~~/fonts/
?
I tried this patch, work as expected:
diff --git a/src/main.cpp b/src/main.cpp
index 32fe4a2..138a7be 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -98,7 +98,8 @@ static int gui_thread() {
io.Fonts->AddFontDefault(&font_cfg);
} else {
const ImWchar* unicodeRanges = buildGlyphRanges();
- io.Fonts->AddFontFromFileTTF(config.fontPath.c_str(), 0, &font_cfg, unicodeRanges);
+ auto fontPath = mp_expand_path(config.fontPath.c_str());
+ io.Fonts->AddFontFromFileTTF(fontPath.c_str(), 0, &font_cfg, unicodeRanges);
}
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
I tried this patch, work as expected
You may want to send a PR for it.
The default fonts is lack of CJK fonts now, so my information in Chinease couldn't read.