Skip to content

fix: use sans-serif font family on Linux when Twemoji is enabled#134

Open
tyronetheqt wants to merge 1 commit into
ExteraApp:mainfrom
tyronetheqt:main
Open

fix: use sans-serif font family on Linux when Twemoji is enabled#134
tyronetheqt wants to merge 1 commit into
ExteraApp:mainfrom
tyronetheqt:main

Conversation

@tyronetheqt

Copy link
Copy Markdown

When Twemoji is set as a `fontFamilyFallback` on Linux with no explicit `fontFamily` (null), the Flutter engine promotes the first fallback to the primary font. This causes Twemoji to render all text glyphs, resulting in missing characters for most UI text on Linux.

Fix this by setting `fontFamily` to ``sans-serif`` (resolved through fontconfig) on Linux when Twemoji is enabled. On other platforms the existing null behavior is preserved, since their font managers handle `fontFamilyFallback` correctly.

As a related improvement, Android-specific fonts (SystemFont, Roboto) are filtered out from the fallback fonts list on non-Android platforms to avoid lookup failures.

Closes #124

When Twemoji is set as a fontFamilyFallback on Linux with no explicit
fontFamily (null), the Flutter engine promotes the first fallback to
the primary font. This causes Twemoji to render all text glyphs,
resulting in missing characters for most UI text.

Fix this by setting fontFamily to "sans-serif" (resolved through
fontconfig) on Linux when Twemoji is enabled. On other platforms the
existing null behavior is preserved, since their font managers handle
fontFamilyFallback correctly.

As a related improvement, filter out Android-specific fonts (SystemFont,
Roboto) from the fallback fonts list on non-Android platforms.

Closes ExteraApp#124
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.

Linux: digits missing in messages due to invalid font fallbacks

1 participant