Repository navigation
fix(lens): load every symbol face, and stop failing on a host's missing emoji font - #33
Merged
Merged
Conversation
h4x0r
force-pushed
the
fix/lens-font-fallback
branch
from
August 20, 2026 23:03
8e161ec to
910bc4c
Compare
…ng emoji font
`tests/fonts.rs` failed on a Linux host with `['🌐', '⚙']` uncovered. Two
different problems wore one error message.
⚙ WAS A REAL BUG. `fallback_fonts()` took `first_readable(SYMBOL_FONTS)` -- one
face -- but Linux spreads symbol coverage across several that do not subsume one
another: Noto Symbols2 carries ◷ and not ⚙, Noto Symbols carries ⚙ and not 🌐,
and DejaVu carries ⚙ where Noto is absent. A host with Symbols2 installed
rendered ⚙ as tofu in the overlay while a face that covers it sat unread beside
it. Every readable symbol face is now loaded, as SCRIPT_FONTS already did, and
the candidate list gains Noto Symbols, DejaVu, and the platform emoji faces.
That is a user-visible rendering fix, not a test fix. Anyone running the overlay
on such a host was seeing the box.
🌐 WAS NOT A BUG. U+1F310 is astral and lives only in an emoji face; a host with
none installed cannot render it whatever we ship. Failing on that made the test
an audit of the developer's font packages rather than of the code -- and it is
exactly the kind of red that gets waved off until it hides something real.
The test now separates the two. Non-astral symbols are asserted unconditionally:
an uncovered one means the chrome grew a glyph nothing carries, or SYMBOL_FONTS
is missing a face, and both are ours to fix. Astral symbols are asserted only
when an emoji face is actually loaded -- and when it is not, the skip is REPORTED
BY NAME:
no emoji face on this host — NOT checked: ['🌐'] (install a Noto Color
Emoji / Segoe UI Emoji / Apple Color Emoji face to cover them)
A silent skip would let the symbol set drift while the test still read green.
PROVEN TO STILL FAIL. The first control I wrote was worthless: U+2C7F is covered
by DejaVu, so the mutation passed and proved nothing. Probing the loaded stack
for a genuinely uncovered codepoint gave U+A7CB; adding it to UI_SYMBOLS turns
the test red and names the glyph, and removing it turns it green again.
FOLLOW-UP after CI disagreed with the local run.
Loading every symbol face made the stack non-empty on the CI runners, where it
had been empty -- so the old `stack.is_empty()` skip stopped firing and the test
began running there for the first time. It immediately reported the pillar
labels and era kanji as tofu, because the ubuntu runner has no CJK face. Correct
observation, wrong conclusion to draw from it: that is the runner's font
packages, not this code.
So the partition is by REQUIRED FACE CLASS rather than by astral-ness. A symbol
is checked only when a face of its class actually parsed -- emoji for astral,
CJK for Han, any face otherwise -- and an unchecked class is named in the output.
`loaded()` now asks the PARSED faces, not the stack. NotoColorEmoji is a CBDT
bitmap font; a parser that declines it would otherwise leave the key present,
the glyph uncovered, and the test failing for a symbol nothing could render.
And the skip is closed rather than merely reported: the Lens build job now
installs fonts-noto-cjk, fonts-noto-core and fonts-noto-color-emoji, so CI is a
host where every class CAN be checked. A skip that fires on every run is a check
that never runs.
h4x0r
force-pushed
the
fix/lens-font-fallback
branch
from
August 20, 2026 23:12
910bc4c to
9f24730
Compare
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.
tests/fonts.rsfailed with['🌐', '⚙']uncovered. Two different problems wearing one error message, and only one was a bug.⚙ was a real, user-visible bug
fallback_fonts()tookfirst_readable(SYMBOL_FONTS)— one face. But Linux spreads symbol coverage across several that do not subsume one another:A host with Symbols2 installed rendered ⚙ as tofu in the overlay while a face that covers it sat unread beside it. Every readable symbol face is now loaded — as
SCRIPT_FONTSalready did — and the candidate list gains Noto Symbols, DejaVu and the platform emoji faces.That is a rendering fix, not a test fix. Anyone running the overlay on such a host was seeing the box.
🌐 was not a bug
U+1F310 is astral and lives only in an emoji face; a host with none installed cannot render it whatever we ship. Failing on that made the test an audit of the developer's font packages rather than of the code — and it is exactly the kind of red that gets waved off until it hides something real.
The test now separates the two:
SYMBOL_FONTSis missing a face. Both are ours.A silent skip would let the symbol set drift while the test still read green.
Proven to still fail
My first control was worthless: U+2C7F is covered by DejaVu, so the mutation passed and proved nothing. Probing the loaded stack for a genuinely uncovered codepoint gave U+A7CB; adding it to
UI_SYMBOLSturns the test red and names the glyph, removing it turns it green.lens: clippy
-D warningsclean, 108 tests pass.