Comment by flohofwoe
4 hours ago
TL;DR: it can be all sorts of things, from 'half-pixel' positioning problems, to upscaling issues, to poor source data. I didn't put too much effort into getting the text rendering look good (and text rendering is hard).
More details:
The demo is using half-resolution on high-dpi displays (currently that's sokol-app's default setting, but not sure if that still makes sense in this day and age tbh), this half resolution amplifies all sorts of text rendering issues, and it gets especially bad when there's a fractional system-dpi-scale like 125% or 150%.
PS: another problem (maybe the main problem, even if everything else is correct) is that the demo's pre-baked font atlas texture isn't all that great since it has 'anti-aliasing' baked into the glyph pixels, and the font atlas texture has a very low resolution (glyph height is 10 pixels, which would be ok for a 'crisp' hand-drawn bitmap font, but not when the font atlas has been created from a regular TTF font, which this one seems to be).
Does this Dear ImGui demo look better on your setup? This is using the native display DPI and uses a TTF font instead of a bitmap font:
https://floooh.github.io/sokol-html5/imgui-highdpi-sapp.html
Dear ImGui looks a lot better.