Open abossard opened 4 years ago
I reverted the test metrics (cell ascent and descent and letter spacing) to the previous values. I compiled a few examples and didn't notice a degradation.
The fix in the current form is incorrect, as pointed out in issue #626. The reason for duplicating properties of the original font is to preserve path to custom fonts (FC_FONT
, FC_INDEX
). The font metrics in the test are from the custom font and if you observe different ones it means the font was incorrectly substituted.
@filipnavara do you know which component is responsible for the Font substitution?
It looks like the FcPatternDuplicate does not copy the font correctly. Certain fonts in Windows are different in Linux; I wonder if the FcPatternDuplicate would handle such cases. (e.g. Arial in Linux is: Liberation Sans)
I built the latest mono from master and I can confirm that this revert of FcPatternDuplicate resolves the font issue for me.
Debian with LightDM Mono: Built from master libgdiplus: master + this patch
This fixes the wrong font-weight from issue #626
Sadly I it breaks the tests, but it does render the font as Bold.
I'll check what's wrong with the tests. Is this maybe a Mono issue instead of a libgdiplus issue?