diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-08 12:24:10 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-08 12:24:10 +0200 |
commit | 2fb1f5bed356520bc0b668f2a8ffef6c8d0318d2 (patch) | |
tree | 69f1511ff2e2baa2e45ba17ab6ed9372bc0b2077 /src/ui/text.h | |
parent | 6f383d147fdcedd9626bfa3a80d4d5953eae398f (diff) |
Local Gemini links can use Emoji/symbol from label text
Instead of the default link icon, if a label starts with an Emoji or
symbol, use that as the icon. This only works with local Gemini links so
important information about link destination is not hidden.
Diffstat (limited to 'src/ui/text.h')
-rw-r--r-- | src/ui/text.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/text.h b/src/ui/text.h index acce286b..d57c2c62 100644 --- a/src/ui/text.h +++ b/src/ui/text.h | |||
@@ -140,6 +140,13 @@ iLocalDef iBool isEmoji_Char(iChar c) { | |||
140 | return (c >= 0x1f300 && c < 0x1f700) || (c >= 0x1f7e0 && c <= 0x1f7eb) || | 140 | return (c >= 0x1f300 && c < 0x1f700) || (c >= 0x1f7e0 && c <= 0x1f7eb) || |
141 | (c >= 0x1f900 && c <= 0x1f9ff); | 141 | (c >= 0x1f900 && c <= 0x1f9ff); |
142 | } | 142 | } |
143 | iLocalDef iBool isDingbats_Char(iChar c) { | ||
144 | return c >= 0x2702 && c <= 0x27b0; | ||
145 | } | ||
146 | iLocalDef iBool isSymbol_Char(iChar c) { | ||
147 | return (c == 0x2218 || c == 0x2219) || (c >= 0x1f680 && c <= 0x1f6c0) || | ||
148 | (c >= 0x2300 && c <= 0x26ff); | ||
149 | } | ||
143 | 150 | ||
144 | #define emojiVariationSelector_Char ((iChar) 0xfe0f) | 151 | #define emojiVariationSelector_Char ((iChar) 0xfe0f) |
145 | 152 | ||