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

Fix incorrect fontconfig. #535

Merged
merged 1 commit into from
Nov 21, 2020

Conversation

xuzhao9
Copy link
Contributor

@xuzhao9 xuzhao9 commented Nov 19, 2020

The current config/fontconfig is incorrect. Fontconfig deletes the first matched font family. Therefore, it actually unsets the "Hack" family instead of the "sans-serif" family.

Evidence: on my machine, after applying the upsteam 45-Hack.conf, "fc-match -s Hack" returns:

NotoSans-Regular.ttf: "Noto Sans" "Regular"
NotoSansJP-Regular.otf: "Noto Sans JP" "Regular"
NotoSansSC-Regular.otf: "Noto Sans SC" "Regular"
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
Cantarell-Regular.otf: "Cantarell" "Regular"
n019003l.pfb: "Nimbus Sans L" "Regular"
luxisr.ttf: "Luxi Sans" "Regular"
wqy-microhei.ttc: "WenQuanYi Micro Hei" "Regular"

It doesn't even return Hack match, because it is deleted.

After applying the 45-Hack.conf in this PR, "fc-match -s Hack" returns:

Hack-Regular.ttf: "Hack" "Regular"
Hack-Bold.ttf: "Hack" "Bold"
SourceCodePro-Regular.otf: "Source Code Pro" "Regular"
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
DejaVuSansMono-Bold.ttf: "DejaVu Sans Mono" "Bold"
DroidSansMono.ttf: "Droid Sans Mono" "Regular"

It returns both Hack and other monospace fonts, which is the correct behavior.

@fjfnaranjo
Copy link

I can confirm this behavior following installing instructions in a almost clean (installed xorg, a display manager..) Debian 10 installation.

I can also confirm that applying this patch the problem is fixed.

@chrissimpkins
Copy link
Member

Tyvm! I really appreciate the update.

@chrissimpkins chrissimpkins merged commit a737c12 into source-foundry:master Nov 21, 2020
@xuzhao9 xuzhao9 deleted the fix-fontconfig branch November 21, 2020 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants