mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #501] [Issue]: Custom font registration uses literal quote characters in family name, breaking weight matching #230
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#230
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Rasa23 on GitHub (May 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/501
Summary
When a Google Font is selected in Settings → Visual Style → Font, ME registers a
FontFacewhose family name is a literal string including embedded quote characters (e.g."Noto Sans"rather thanNoto Sans). This malformed registration appears to win font matching over properly-formed@font-facerules with the same family name, causing text to render at the wrong weight.Expected behavior
Selecting "Noto Sans" as the active font registers the family with name
Noto Sans(no embedded quotes) at the appropriate numeric weight. Custom theme@font-facerules adding additional weights for the same family should match and apply normally.Actual behavior
ME registers a
FontFacewithfamily: "\"Noto Sans\""andweight: "normal". With this registration present, custom-theme@font-facerules for the same family stop behaving correctly. In our case, a theme rule loadingNotoSans-Bold.ttfatfont-weight: 700ended up rendering bold for all Noto Sans text, including text where CSS computedfont-weight: 400. DevTools Computed showsfont-weight: 400on regular text, but Rendered Fonts reportsPostScript name: NotoSans-Bold.Steps to reproduce
family: "\"Noto Sans\""(the family name itself contains literal quote characters) andweight: "normal".Environment
Logs, screenshots, or video
Additional context
Console output of
[...document.fonts]showing the malformed family name (escaped quotes are part of the actual string, not display formatting):Workaround: leave ME's font picker on "Default" and load the desired font entirely from theme CSS under a unique family name (e.g.
NotoSansCustom). This avoids the conflict because the malformed"Noto Sans"registration never gets created.Likely cause: wherever ME's font loader hydrates the user-selected font into a
FontFaceand adds it todocument.fonts, the family name is being passed through with surrounding CSS quotes still attached rather than stripped. Theweight: "normal"(string) rather than numeric value may be a related issue in the same code path. (...at least, this is what Claude tells me!)Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: