omar
omar
Thanks @xuboying. I honesty don't know when I would be able to look at all, but it seems like good and careful work, I appreciate it.
Taking note that decoupling LineHeight from FontSize is also required for #4742. It indeed would be good to merge this separately, thanks for splitting it.
I'll be trying to tackle this soon. (1) Any reason why this is still a draft? > The old size behavior remains when ImFontCfg::SizePixels is greater than zero (for legacy...
> Replaced ceil(metrics.height) with ceil(font->height * metrics.y_scale) to workaround the line height being sometimes 1px smaller than expected. FreeType [rounds metrics.height](https://github.com/freetype/freetype/blob/27c1cb10a52420515ce66729dfca897be21691b8/src/base/ftobjs.c#L3176) (GRID_FIT_METRICS is always defined). (Typical case: height=round(16.22), ascender=ceil(12.53), descender=floor(-3.69)...
Notes: - Try to compile with both `#define IMGUI_ENABLE_FREETYPE` and `#define IMGUI_ENABLE_STB_TRUETYPE` which allows dynamic toggling, which is useful to validate some calculation. - `TableAngledHeadersRowEx()` uses `g.FontSize` a few times...
I found that the best way to reason about this is to enable both backends, and printout a maximum numbers of infos, e.g. ```cpp FT_Pos line_gap = metrics.height - metrics.ascender...
In https://github.com/ocornut/imgui/pull/8857#issuecomment-3267784736 I edited the stb_truetype's `baked->Ascent = ` line to use `ImFloor()` and I get matching Ascent/Descent/LineHeight value with both stb_truetype and FreeType for _most fonts_ i tried (a...
Thanks for the details, though the sum of details gets easily confusing. Your suggested logic (branching on line_gap>0) written as is doesn't seem to fix Helvetica or Cousine being too...
> Perhaps it could dynamically switch depending on whether the font has a line gap? What's the reasoning for that again? the (line_gap>0) path seems ok to me, where does...
What settings or piece of code do you use to have a one to one mapping between Firebox and Dear ImGui, in terms of spacing and DPI handling? ```cpp for...