nandi/frqpublic Fork 0
c750016
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Keep Flutter's emoji off the UI font

The theme sets `fontFamily` to Fira Sans, so every `Text` that says nothing
about its font is set in it — including the two arms that draw nothing but a
picture. The edit banner's pencil is the one that shows: Fira Sans has no
emoji, and `:emoji` handed it the pencil to set. Same shape as the jolt side,
where a label has no emoji in it either; the answer here is naming the emoji
font rather than moving the glyph out of a label.

`:reaction` draws from the same pack, so it asks for the same style.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T08:48:23-07:00 Browse files
c750016 parent: 9d0b095
modified flutter/src/frq/hiccup.cljd +2 -2
@@ -723,7 +723,7 @@
723723 .mainAxisSize m/MainAxisSize.min
724724 .children
725725 (into [(m/Text (str (:emoji p ""))
726- .style (m/TextStyle .fontSize size))]
726+ .style (t/emoji-style size))]
727727 (when (and (number? n) (pos? n))
728728 [(m/SizedBox .width pad)
729729 (m/Text (str n)
@@ -925,7 +925,7 @@
925925 field))
926926
927927 :emoji
928- (m/Text (str (:emoji p "")) .style (m/TextStyle .fontSize (dbl (:size p) 16.0)))
928+ (m/Text (str (:emoji p "")) .style (t/emoji-style (dbl (:size p) 16.0)))
929929
930930 ;; A face is a way in to who someone is, so it takes the press that
931931 ;; opens their profile. It was drawn without one and the chat screen's
@@ -723,7 +723,7 @@
723 .mainAxisSize m/MainAxisSize.min723 .mainAxisSize m/MainAxisSize.min
724 .children724 .children
725 (into [(m/Text (str (:emoji p ""))725 (into [(m/Text (str (:emoji p ""))
726- .style (m/TextStyle .fontSize size))]726+ .style (t/emoji-style size))]
727 (when (and (number? n) (pos? n))727 (when (and (number? n) (pos? n))
728 [(m/SizedBox .width pad)728 [(m/SizedBox .width pad)
729 (m/Text (str n)729 (m/Text (str n)
@@ -925,7 +925,7 @@
925 field))925 field))
926 926
927 :emoji927 :emoji
928- (m/Text (str (:emoji p "")) .style (m/TextStyle .fontSize (dbl (:size p) 16.0)))928+ (m/Text (str (:emoji p "")) .style (t/emoji-style (dbl (:size p) 16.0)))
929 929
930 ;; A face is a way in to who someone is, so it takes the press that930 ;; A face is a way in to who someone is, so it takes the press that
931 ;; opens their profile. It was drawn without one and the chat screen's931 ;; opens their profile. It was drawn without one and the chat screen's
modified flutter/src/frq/theme.cljd +16 -0
@@ -53,6 +53,22 @@
5353 back rather than a colour of its own."
5454 (.withValues ^m/Color on-bg .alpha 0.7))
5555
56+(defn emoji-style
57+ "A `TextStyle` for a run that is nothing but emoji.
58+
59+ The app sets `fontFamily` on the theme, so every `Text` that says nothing
60+ about its font is set in Fira Sans a UI font with no emoji in it, and the
61+ screens draw a picture where it has no glyph. Naming the platform's emoji
62+ font here is what keeps `:emoji` and `:reaction` off that font: Noto Color
63+ Emoji is the Android one and the one COSMIC ships, and the fallbacks are the
64+ other two desktops in case this runs on one."
65+ [size]
66+ (m/TextStyle .fontSize size
67+ .fontFamily "Noto Color Emoji"
68+ .fontFamilyFallback ["Apple Color Emoji"
69+ "Segoe UI Emoji"
70+ "Noto Emoji"]))
71+
5672 (def brightness (if c/dark? m/Brightness.dark m/Brightness.light))
5773
5874 (defn app-theme []
@@ -53,6 +53,22 @@
53 back rather than a colour of its own."53 back rather than a colour of its own."
54 (.withValues ^m/Color on-bg .alpha 0.7))54 (.withValues ^m/Color on-bg .alpha 0.7))
55 55
56+(defn emoji-style
57+ "A `TextStyle` for a run that is nothing but emoji.
58+
59+ The app sets `fontFamily` on the theme, so every `Text` that says nothing
60+ about its font is set in Fira Sans a UI font with no emoji in it, and the
61+ screens draw a picture where it has no glyph. Naming the platform's emoji
62+ font here is what keeps `:emoji` and `:reaction` off that font: Noto Color
63+ Emoji is the Android one and the one COSMIC ships, and the fallbacks are the
64+ other two desktops in case this runs on one."
65+ [size]
66+ (m/TextStyle .fontSize size
67+ .fontFamily "Noto Color Emoji"
68+ .fontFamilyFallback ["Apple Color Emoji"
69+ "Segoe UI Emoji"
70+ "Noto Emoji"]))
71+
56 (def brightness (if c/dark? m/Brightness.dark m/Brightness.light))72 (def brightness (if c/dark? m/Brightness.dark m/Brightness.light))
57 73
58 (defn app-theme []74 (defn app-theme []