-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text renders at low resolution when FontScalingGlobal is set to 0.5 #7
Comments
Note that the problem doesn't occur when trying out the same configuration with the ImGui 1.60 samples. That is, the issue doesn't have to do with the ImGui version. This suggests the issue has to do with the font texture configuration in |
Did you enable HighDPI mode like here? Otherwise Oryol will render at half resolution on Retina displays to preserve pixel fillrate. Also, Sokol has a HighDPI-Sample for Imgui, does the following produce the expected result?
Upscaled text from this demo: I'm not using FontGlobalScale in this demo though, instead I scale the vertices and cliprects, and set OversampleH and OversampleV in ImFontConfig to the value 2, so that the font glyphs are rendered with twice the resolution. The complete sokol-demo is here: https://github.com/floooh/sokol-samples/blob/master/sapp/imgui-highdpi-sapp.cc In Oryol it would work similar as long as the GfxSetup::HighDPI flag is set. |
PS: I also updated the fips-imgui repository (used by oryol-imgui) to the latest ImGui master-branch version (1.62+). |
...wait, the way how I'm doing the Retina-scaling in the sokol-sample doesn't work in oryol-imgui, since this doesn't support vertex- and clip-rect-scaling in the ImGui-draw-hook. I'll most likely implement this after I merged the sokol-gfx Gfx backend in Oryol back to master, but this is most likely a few weeks away. For now your best bet is to try the GfxSetup::HighDPI flag to render in full Retina resolution, and then use ImGui FontScaling to increase the text size (otherwise everything will be very tiny). Cheers! |
I tried setting the
Here's a comparison where I modulate the font size and I'll keep digging around. Thanks again for the quick feedback @floooh! |
Usage of this library interferes with ImGui's text rendering quality. This seems to result in text being rendered at half the expected resolution. I'm using a retina display.
Left:
ImGui 1.62 WIP
, built from sourceFont: Roboto-Medium.ttf, Size: 32.0f, FontScalingGlobal: 0.5
Left:
ImGui 1.60 WIP
as used from floooh/oryol-imgui with MSAA 4Font: Roboto-Medium.ttf, Size: 32.0f, FontScalingGlobal: 0.5
Let me know and I can cook up a more reproducible gist.
The text was updated successfully, but these errors were encountered: