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

Use weight absolute difference in monospace fallback matching #224

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

MoSal
Copy link
Contributor

@MoSal MoSal commented Jan 31, 2024

When matching on weights smaller than normal, "equal or smaller"
weight restriction may cause monospace fallback to fail, depending
on font support at such weights for the text to be shaped.

So remove that restriction, and calculate weight differences instead
of offsets.

In case of no exact weight match, and with all other factors being
equal, smaller weights will be picked before bigger ones. So, this
should generally not cause any behavioral changes when matching on
normal weight or bigger.

Should fix pop-os/cosmic-term#104.

 When matching on weights smaller than normal, "equal or smaller"
 weight restriction may cause monospace fallback to fail, depending
 on font support at such weights for the text to be shaped.

 So remove that restriction, and calculate weight differences instead
 of offsets.

 In case of no exact weight match, and with all other factors being
 equal, smaller weights will be picked before bigger ones. So, this
 should generally not cause any behavioral changes when matching on
 normal weight or bigger.

 Should fix pop-os/cosmic-term#104.

Signed-off-by: Mohammad AlSaleh <[email protected]>
@snaggen
Copy link

snaggen commented Jan 31, 2024

I can confirm that this do fix pop-os/cosmic-term#104

@jackpot51 jackpot51 merged commit 0cea556 into pop-os:main Jan 31, 2024
1 of 2 checks passed
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.

Fallback font search is to strict
3 participants