diff options
Diffstat (limited to 'src/ui/text.h')
-rw-r--r-- | src/ui/text.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/ui/text.h b/src/ui/text.h index 6728bb62..5867a84b 100644 --- a/src/ui/text.h +++ b/src/ui/text.h | |||
@@ -127,7 +127,8 @@ iLocalDef iBool isDefaultIgnorable_Char(iChar c) { | |||
127 | c == 0xfeff; | 127 | c == 0xfeff; |
128 | } | 128 | } |
129 | iLocalDef iBool isEmoji_Char(iChar c) { | 129 | iLocalDef iBool isEmoji_Char(iChar c) { |
130 | return (c >= 0x1f300 && c < 0x1f700) || (c >= 0x1f900 && c <= 0x1f9ff); | 130 | return (c >= 0x1f300 && c < 0x1f700) || (c >= 0x1f7e0 && c <= 0x1f7eb) || |
131 | (c >= 0x1f900 && c <= 0x1f9ff); | ||
131 | } | 132 | } |
132 | 133 | ||
133 | #define emojiVariationSelector_Char ((iChar) 0xfe0f) | 134 | #define emojiVariationSelector_Char ((iChar) 0xfe0f) |
@@ -141,21 +142,21 @@ enum iTextFont { | |||
141 | 142 | ||
142 | extern int gap_Text; /* affected by content font size */ | 143 | extern int gap_Text; /* affected by content font size */ |
143 | 144 | ||
144 | void init_Text (SDL_Renderer *); | 145 | void init_Text (SDL_Renderer *); |
145 | void deinit_Text (void); | 146 | void deinit_Text (void); |
146 | 147 | ||
147 | void setContentFont_Text (enum iTextFont font); | 148 | void setContentFont_Text (enum iTextFont font); |
148 | void setHeadingFont_Text (enum iTextFont font); | 149 | void setHeadingFont_Text (enum iTextFont font); |
149 | void setContentFontSize_Text (float fontSizeFactor); /* affects all except `default*` fonts */ | 150 | void setContentFontSize_Text (float fontSizeFactor); /* affects all except `default*` fonts */ |
150 | void resetFonts_Text (void); | 151 | void resetFonts_Text (void); |
151 | 152 | ||
152 | int lineHeight_Text (int fontId); | 153 | int lineHeight_Text (int fontId); |
153 | iInt2 measure_Text (int fontId, const char *text); | 154 | iInt2 measure_Text (int fontId, const char *text); |
154 | iInt2 measureRange_Text (int fontId, iRangecc text); | 155 | iInt2 measureRange_Text (int fontId, iRangecc text); |
155 | iRect visualBounds_Text (int fontId, iRangecc text); | 156 | iRect visualBounds_Text (int fontId, iRangecc text); |
156 | iInt2 advance_Text (int fontId, const char *text); | 157 | iInt2 advance_Text (int fontId, const char *text); |
157 | iInt2 advanceN_Text (int fontId, const char *text, size_t n); /* `n` in characters */ | 158 | iInt2 advanceN_Text (int fontId, const char *text, size_t n); /* `n` in characters */ |
158 | iInt2 advanceRange_Text (int fontId, iRangecc text); | 159 | iInt2 advanceRange_Text (int fontId, iRangecc text); |
159 | iInt2 advanceWrapRange_Text (int fontId, int maxWidth, iRangecc text); | 160 | iInt2 advanceWrapRange_Text (int fontId, int maxWidth, iRangecc text); |
160 | 161 | ||
161 | iInt2 tryAdvance_Text (int fontId, iRangecc text, int width, const char **endPos); | 162 | iInt2 tryAdvance_Text (int fontId, iRangecc text, int width, const char **endPos); |