Skip to content

Fix SimSun-ExtB being incorrectly merged with SimSun - #8042

Merged
laurmaedje merged 1 commit into
typst:mainfrom
DzmingLi:fix/simsun-extb-exception
Mar 30, 2026
Merged

laurmaedje merged 1 commit into
typst:mainfrom
DzmingLi:fix/simsun-extb-exception

Conversation

@DzmingLi

Copy link
Copy Markdown
Contributor

typographic_family() strips the suffix "ExtB" from "SimSun-ExtB", treating it as an "ExtraBold" style variant. This incorrectly merges SimSun-ExtB (a CJK Unified Ideographs Extension B supplementary font covering U+20000–U+2A6DF) with SimSun (the standard font covering the CJK basic block U+4E00–U+9FFF) into a single family. Since both register as Normal/400 variants, book.select() may non-deterministically pick SimSun-ExtB, which lacks basic CJK characters, causing fallback to an unrelated system font.

The fix adds a family exception for SimSun-ExtB, consistent with similar entries for Archivo Narrow, Noto Sans Display, etc.

Closes #6205

@laurmaedje
laurmaedje added this pull request to the merge queue Mar 30, 2026
@laurmaedje

Copy link
Copy Markdown
Member

The whole name processing logic is very unfortunate and should be reconsidered at some point. Thanks for the fix!

Merged via the queue into typst:main with commit 88b27bf Mar 30, 2026
8 checks passed
jassielof pushed a commit to jassielof/typst that referenced this pull request Apr 7, 2026
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.

Typst chooses different fonts when setting font as SimSun in text

2 participants