[1mdiff --git a/src/ui/text.c b/src/ui/text.c[m
[1mindex db922715..51865654 100644[m
[1m--- a/src/ui/text.c[m
[1m+++ b/src/ui/text.c[m
[36m@@ -116,6 +116,7 @@[m [miDefineTypeConstructionArgs(Glyph, (iChar ch), ch)[m
[m
struct Impl_Font {[m
iBlock * data;[m
[32m+[m[32m enum iTextFont family;[m
stbtt_fontinfo font;[m
float xScale, yScale;[m
int vertOffset; /* offset due to scaling */[m
[36m@@ -134,6 +135,15 @@[m [mstatic void init_Font(iFont *d, const iBlock *data, int height, float scale,[m
enum iFontSize sizeId, iBool isMonospaced) {[m
init_Hash(&d->glyphs);[m
d->data = NULL;[m
[32m+[m[32m d->family = undefined_TextFont;[m
[32m+[m[32m /* Note: We only use family
currently for applying a kerning fix to Nunito. */[m
[32m+[m[32m if (data == &fontNunitoRegular_Embedded ||[m
[32m+[m[32m data == &fontNunitoBold_Embedded ||[m
[32m+[m[32m data == &fontNunitoExtraBold_Embedded ||[m
[32m+[m[32m data == &fontNunitoLightItalic_Embedded ||[m
[32m+[m[32m data == &fontNunitoExtraLight_Embedded) {[m
[32m+[m[32m d->family = nunito_TextFont;[m
[32m+[m[32m }[m
d->isMonospaced = isMonospaced;[m
d->height = height;[m
iZap(d->font);[m
[36m@@ -1128,14 +1138,26 @@[m [mstatic iRect run_Font_(iFont *d, const iRunArgs *args) {[m
const iChar next = nextChar_(&peek, args->text.end);[m
if (enableKerning_Text && !d->manualKernOnly && next) {[m
const uint32_t nextGlyphIndex = glyphIndex_Font_(glyph->font, next);[m
[31m- const int kern = stbtt_GetGlyphKernAdvance([m
[32m+[m[32m int kern = stbtt_GetGlyphKernAdvance([m
&glyph->font->font, glyph->glyphIndex, nextGlyphIndex);[m
[32m+[m[32m /* Nunito needs some kerning fixes. */[m
[32m+[m[32m if (glyph->font->family == nunito_TextFont) {[m
[32m+[m[32m if (ch == 'W' && (next == 'i' || next == 'h')) {[m
[32m+[m[32m kern = -30;[m
[32m+[m[32m }[m
[32m+[m[32m else if (ch == 'T' && next == 'h') {[m
[32m+[m[32m kern = -15;[m
[32m+[m[32m }[m
[32m+[m[32m else if (ch == 'V' && next == 'i') {[m
[32m+[m[32m kern = -15;[m
[32m+[m[32m }[m
[32m+[m[32m }[m
if (kern) {[m
// printf("%lc(%u) -> %lc(%u): kern %d (%f)\n", ch, glyph->glyphIndex, next,[m
// nextGlyphIndex,[m
// kern, d->xScale * kern);[m
[31m- xpos += d->xScale * kern;[m
[31m- xposExtend += d->xScale * kern;[m
[32m+[m[32m xpos += glyph->font->xScale * kern;[m
[32m+[m[32m xposExtend += glyph->font->xScale * kern;[m
}[m
}[m
}[m
[1mdiff --git a/src/ui/text.h b/src/ui/text.h[m
[1mindex 2f2bcf3a..768713ee 100644[m
[1m--- a/src/ui/text.h[m
[1m+++ b/src/ui/text.h[m
[36m@@ -116,7 +116,8 @@[m [miLocalDef iBool isJapanese_FontId(enum iFontId id) {[m
#define emojiVariationSelector_Char ((iChar) 0xfe0f)[m
[m
enum iTextFont {[m
[31m- nunito_TextFont,[m
[32m+[m[32m undefined_TextFont = -1,[m
[32m+[m[32m nunito_TextFont = 0,[m
firaSans_TextFont,[m
literata_TextFont,[m
tinos_TextFont,[m
text/plain
This content has been proxied by September (3851b).