Skip to content
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

Bugfix/font style issue #629

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

abossard
Copy link

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?

@dnfclas
Copy link

dnfclas commented Feb 27, 2020

CLA assistant check
All CLA requirements met.

@abossard
Copy link
Author

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.

@filipnavara
Copy link
Contributor

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.

Base automatically changed from master to main March 12, 2021 13:26
@engrch
Copy link

engrch commented Apr 12, 2021

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants