diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/root.c | 2 | ||||
-rw-r--r-- | src/ui/text.c | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/ui/root.c b/src/ui/root.c index 49925856..15548e74 100644 --- a/src/ui/root.c +++ b/src/ui/root.c | |||
@@ -1049,7 +1049,7 @@ void createUserInterface_Root(iRoot *d) { | |||
1049 | moveToParentRightEdge_WidgetFlag); | 1049 | moveToParentRightEdge_WidgetFlag); |
1050 | /* Feeds refresh indicator is inside the input field. */ { | 1050 | /* Feeds refresh indicator is inside the input field. */ { |
1051 | iLabelWidget *queryInd = | 1051 | iLabelWidget *queryInd = |
1052 | new_LabelWidget(uiTextAction_ColorEscape "${status.query} \u21a9", NULL); | 1052 | new_LabelWidget(uiTextAction_ColorEscape "${status.query} " return_Icon, NULL); |
1053 | setId_Widget(as_Widget(queryInd), "input.indicator.search"); | 1053 | setId_Widget(as_Widget(queryInd), "input.indicator.search"); |
1054 | setBackgroundColor_Widget(as_Widget(queryInd), uiBackground_ColorId); | 1054 | setBackgroundColor_Widget(as_Widget(queryInd), uiBackground_ColorId); |
1055 | setFrameColor_Widget(as_Widget(queryInd), uiTextAction_ColorId); | 1055 | setFrameColor_Widget(as_Widget(queryInd), uiTextAction_ColorId); |
diff --git a/src/ui/text.c b/src/ui/text.c index 0e6a6d32..d35b470c 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -154,8 +154,13 @@ static void init_Font(iFont *d, const iBlock *data, int height, float scale, | |||
154 | } | 154 | } |
155 | d->baseline = ascent * d->yScale; | 155 | d->baseline = ascent * d->yScale; |
156 | d->vertOffset = height * (1.0f - scale) / 2; | 156 | d->vertOffset = height * (1.0f - scale) / 2; |
157 | if (scale > 1.0f) { | 157 | /* Custom tweaks. */ |
158 | d->vertOffset /= 2; /* Tweak for Noto Sans Symbols */ | 158 | if (data == &fontNotoSansSymbolsRegular_Embedded || |
159 | data == &fontNotoSansSymbols2Regular_Embedded) { | ||
160 | d->vertOffset /= 2; | ||
161 | } | ||
162 | else if (data == &fontNotoEmojiRegular_Embedded) { | ||
163 | //d->vertOffset -= height / 30; | ||
159 | } | 164 | } |
160 | d->sizeId = sizeId; | 165 | d->sizeId = sizeId; |
161 | memset(d->indexTable, 0xff, sizeof(d->indexTable)); | 166 | memset(d->indexTable, 0xff, sizeof(d->indexTable)); |
@@ -338,7 +343,7 @@ static void initFonts_Text_(iText *d) { | |||
338 | DEFINE_FONT_SET(&fontNotoSansSymbolsRegular_Embedded, 1.45f), | 343 | DEFINE_FONT_SET(&fontNotoSansSymbolsRegular_Embedded, 1.45f), |
339 | DEFINE_FONT_SET(&fontNotoSansSymbols2Regular_Embedded, 1.45f), | 344 | DEFINE_FONT_SET(&fontNotoSansSymbols2Regular_Embedded, 1.45f), |
340 | DEFINE_FONT_SET(&fontSmolEmojiRegular_Embedded, 1.0f), | 345 | DEFINE_FONT_SET(&fontSmolEmojiRegular_Embedded, 1.0f), |
341 | DEFINE_FONT_SET(&fontNotoEmojiRegular_Embedded, 1.0f), | 346 | DEFINE_FONT_SET(&fontNotoEmojiRegular_Embedded, 1.10f), |
342 | DEFINE_FONT_SET(&fontNotoSansJPRegular_Embedded, 1.0f), | 347 | DEFINE_FONT_SET(&fontNotoSansJPRegular_Embedded, 1.0f), |
343 | DEFINE_FONT_SET(&fontNotoSansSCRegular_Embedded, 1.0f), | 348 | DEFINE_FONT_SET(&fontNotoSansSCRegular_Embedded, 1.0f), |
344 | DEFINE_FONT_SET(&fontNanumGothicRegular_Embedded, 1.0f), /* TODO: should use Noto Sans here, too */ | 349 | DEFINE_FONT_SET(&fontNanumGothicRegular_Embedded, 1.0f), /* TODO: should use Noto Sans here, too */ |
@@ -563,6 +568,9 @@ static void allocate_Font_(iFont *d, iGlyph *glyph, int hoff) { | |||
563 | } | 568 | } |
564 | 569 | ||
565 | iLocalDef iFont *characterFont_Font_(iFont *d, iChar ch, uint32_t *glyphIndex) { | 570 | iLocalDef iFont *characterFont_Font_(iFont *d, iChar ch, uint32_t *glyphIndex) { |
571 | if (isVariationSelector_Char(ch)) { | ||
572 | return d; | ||
573 | } | ||
566 | /* Smol Emoji overrides all other fonts. */ | 574 | /* Smol Emoji overrides all other fonts. */ |
567 | if (ch != 0x20) { | 575 | if (ch != 0x20) { |
568 | iFont *smol = font_Text_(smolEmoji_FontId + d->sizeId); | 576 | iFont *smol = font_Text_(smolEmoji_FontId + d->sizeId); |