https://bugs.winehq.org/show_bug.cgi?id=52597
Bug ID: 52597 Summary: DrawTextExA missing ligatures when CreateFontIndirectA with lfHeight incremented? Product: Wine Version: 7.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: wnbz@conicmail.com Distribution: ---
Created attachment 71924 --> https://bugs.winehq.org/attachment.cgi?id=71924 Application rendering Windows vs Wine
I have an esoteric scientific Windows app which I would like to use with Wine. But, (with Wine) I have noticed that in a significant number of places the text gets cut off, almost as if it is too long to fit. See attachment `app_output.png`. The app displays correctly under Windows.
I do not have access to the source code of this application, and cannot comment on the quality of the code. It may be that the position and size of the bounding box is hard-coded, rather than using a GUI control layout manager.
However, I believe I managed to track down the issue and have created a minimal example which demonstrates the problem (see `main.cpp`, please excuse the style, I am not very familiar with Windows C++ GUI programming).
In the example, I call `CreateFontIndirectA` twice, first time with `lfHeight` of `LOGFONTA` set to `15` and the second time to `16`. The issue seems to arise only for small values of `lfHeight`. See the attachment `testcase_output.png` for how it looks like on Windows vs Wine.
On Windows, both lines are indistinguishable, but on Wine, the second line (`lfHeight = 16`) is significantly longer than the first line (`lfHeight = 15`).
It seems at first like the ligatures of the font are missing - which explains why the text `ffi` changes width but the text `aaa` does not. But I am not sure, as the `ffi` text also seems taller in the second line on Wine.
I am using winehq-devel (7.3) on Ubuntu 20.04. If it helps, I also attach the relevant sections of output with font tracing enabled `WINEARCH=win32 WINEDEBUG=+font wine main.exe`.
https://bugs.winehq.org/show_bug.cgi?id=52597
--- Comment #1 from wnbz@conicmail.com --- Created attachment 71925 --> https://bugs.winehq.org/attachment.cgi?id=71925 Testcase output Windows vs Wine
https://bugs.winehq.org/show_bug.cgi?id=52597
--- Comment #2 from wnbz@conicmail.com --- Created attachment 71926 --> https://bugs.winehq.org/attachment.cgi?id=71926 Minimal source file to reproduce problem
https://bugs.winehq.org/show_bug.cgi?id=52597
--- Comment #3 from wnbz@conicmail.com --- Created attachment 71927 --> https://bugs.winehq.org/attachment.cgi?id=71927 Font trace with lfHeight = 15
https://bugs.winehq.org/show_bug.cgi?id=52597
--- Comment #4 from wnbz@conicmail.com --- Created attachment 71928 --> https://bugs.winehq.org/attachment.cgi?id=71928 Font trace with lfHeight = 16
https://bugs.winehq.org/show_bug.cgi?id=52597
wnbz@conicmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wnbz@conicmail.com
https://bugs.winehq.org/show_bug.cgi?id=52597
wnbz@conicmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|wnbz@conicmail.com |