Repository navigation
font-exceptions: override weight of Arial Black - #3321
Merged
Merged
Conversation
Signed-off-by: Martin Kröning <[email protected]>
1 task done
Member
|
Thanks! |
Dherse
pushed a commit
to Dherse/typst
that referenced
this pull request
Feb 4, 2024
Signed-off-by: Martin Kröning <[email protected]>
Dikluwe
pushed a commit
to Dikluwe/typst-crystalline
that referenced
this pull request
Sep 12, 2026
Signed-off-by: Martin Kröning <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3213.
Summary
The old version of Arial-Black, published by Microsoft in 1996 in their “core fonts for the web” project, has a wrong weight of 400. See https://corefonts.sourceforge.net/. This PR overrides the weight to 900.
Description
As of Debian's msttcorefonts 3.8.1, the package installs the following fonts:
Of those, the only collision is Arial Black with Arial, since they have the same style, weight, and stretch.
Comparing a few font variants:
postScriptNamefontFamilyfontSubfamilyfullNameusWeightClassArial_Bold.ttfArial_Black.ttfArial Black.ttfariblk.ttfThis PR overrides
Arial-Black's weight class to 900.Font Families
Typst sanitizes the font family, removing “Black” from “Arial Black”, resulting Arial Black to be in the same font family as Arial.
Other environments are inconsistent in that regard.
Word on Windows and the font book on macOS show Arial Black as a separate font.
The Windows Font manager and Word on macOS do not list Arial Black separately, only as a variant of Arial.
I propose to keep Typst's current behavior in this regard and treat Arial Black as the same font family as Arial.
Font Subfamilies
I am not sure about the convention of subfamilies and whether it would make sense to override Arial Black's font subfamily to
Black.Keeping it as is works fine, though, and would be the minimal change required to align the metadata to more recent versions of Arial.