You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue contains long trivia about how I found the reason why it didn't work.
I was dead confused while solving this issue, so I elongated the explanation hoping to save some tortured souls.
If you just want to know how to enable Freetype right now, go to the end of problem description.
Is your feature request related to a problem? Please describe.
I tried using a new font (NanumSquare Neo, for those who wants to know), but it looks blurish and ugly.
So I enabled Freetype feature of imgui (and imgui-sys manually to use vcpkg),
imgui-sys = { version = "0.11.0", features = ["freetype", "use-vcpkg"] }
imgui = { version = "0.11.0", features = ["freetype"] }
but found no difference. The two result was pixel perfect identical.
Found this line on Imgui Freetype readme, so I confired that Freetype isn't activated, by changing oversampling settings.
- Oversampling settins are ignored but also not so much necessary with the higher quality rendering.
After many many tries of changing, rebuilding, trying, I digged into imgui-sys, insert some test codes on cpp files,
and finally found out IMGUI_ENABLE_FREETYPE is not defined when imgui main parts are compiling.
build.rs said IMGUI_ENABLE_FREETYPE sets with CIMGUI_FREETYPE, and it was.
Since Freetype builder is built and included but not set as default,
it needs to be exchanged at runtime, before building and loading font atlas textures.
And I think, with current release of imgui-sys, that there's no other way than unsafely doing it.
This issue contains long trivia about how I found the reason why it didn't work.
I was dead confused while solving this issue, so I elongated the explanation hoping to save some tortured souls.
If you just want to know how to enable Freetype right now, go to the end of problem description.
Is your feature request related to a problem? Please describe.
I tried using a new font (NanumSquare Neo, for those who wants to know), but it looks blurish and ugly.
So I enabled Freetype feature of
imgui
(andimgui-sys
manually to use vcpkg),but found no difference. The two result was pixel perfect identical.
Found this line on Imgui Freetype readme, so I confired that Freetype isn't activated, by changing oversampling settings.
imgui-rs/imgui-sys/third-party/imgui-master-freetype/imgui/misc/freetype/README.md
Lines 23 to 25 in cd97e17
After many many tries of changing, rebuilding, trying, I digged into imgui-sys, insert some test codes on cpp files,
and finally found out
IMGUI_ENABLE_FREETYPE
is not defined when imgui main parts are compiling.build.rs
saidIMGUI_ENABLE_FREETYPE
sets withCIMGUI_FREETYPE
, and it was.imgui-rs/imgui-sys/build.rs
Lines 84 to 86 in cd97e17
imgui-rs/imgui-sys/third-party/imgui-master-freetype/cimgui.cpp
Lines 4 to 17 in cd97e17
But
cimgui.cpp
compiles after Imgui things. It has no effect while building Imgui main parts.imgui-rs/imgui-sys/include_imgui_master_freetype.cpp
Lines 1 to 12 in cd97e17
If
IMGUI_ENABLE_FREETYPE
is not set during compilation of Imgui,imstb
is included and used as default.imgui-rs/imgui-sys/third-party/imgui-master-freetype/imgui/imgui_internal.h
Lines 106 to 108 in cd97e17
imgui-rs/imgui-sys/third-party/imgui-master-freetype/imgui/imgui_draw.cpp
Lines 2268 to 2271 in cd97e17
Since Freetype builder is built and included but not set as default,
it needs to be exchanged at runtime, before building and loading font atlas textures.
And I think, with current release of
imgui-sys
, that there's no other way thanunsafe
ly doing it.TL;DR
(And I think it's misleading.)
unsafe
ly.Describe the solution you'd like
Describe alternatives you've considered
unsafe
ly usingimgui-sys
Additional context
Maybe having example program about using Freetype would be very helpful IMO.
The text was updated successfully, but these errors were encountered: