From 43a369fc00e331c377f95c53c4d975e7d6f121a0 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 11 Mar 2021 06:09:50 +0200 Subject: Bring back regular-bold Nunito for links The extra bold that is used for titles is too bold for links. --- CMakeLists.txt | 1 + res/fonts/Nunito-Bold.ttf | Bin 0 -> 176492 bytes src/ui/text.c | 6 +++--- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 res/fonts/Nunito-Bold.ttf diff --git a/CMakeLists.txt b/CMakeLists.txt index d5e51d23..3b61f9dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ set (EMBED_RESOURCES res/fonts/NanumGothic-Regular.ttf res/fonts/NotoEmoji-Regular.ttf res/fonts/NotoSansJP-Regular.ttf + res/fonts/Nunito-Bold.ttf res/fonts/Nunito-ExtraBold.ttf res/fonts/Nunito-ExtraLight.ttf res/fonts/Nunito-LightItalic.ttf diff --git a/res/fonts/Nunito-Bold.ttf b/res/fonts/Nunito-Bold.ttf new file mode 100644 index 00000000..c8fabf7d Binary files /dev/null and b/res/fonts/Nunito-Bold.ttf differ diff --git a/src/ui/text.c b/src/ui/text.c index 520ae74a..a803da97 100644 --- a/src/ui/text.c +++ b/src/ui/text.c @@ -210,7 +210,7 @@ static void initFonts_Text_(iText *d) { const float monoSize = textSize * 0.71f; const float smallMonoSize = monoSize * 0.8f; const iBlock *regularFont = &fontNunitoRegular_Embedded; - const iBlock *boldFont = &fontNunitoExtraBold_Embedded; + const iBlock *boldFont = &fontNunitoBold_Embedded; const iBlock *italicFont = &fontNunitoLightItalic_Embedded; const iBlock *h12Font = &fontNunitoExtraBold_Embedded; const iBlock *h3Font = &fontNunitoRegular_Embedded; @@ -418,7 +418,7 @@ static void initCache_Text_(iText *d) { if (renderInfo.max_texture_height > 0 && d->cacheSize.y > renderInfo.max_texture_height) { d->cacheSize.y = renderInfo.max_texture_height; d->cacheSize.x = renderInfo.max_texture_width; - } + } d->cacheRowAllocStep = iMax(2, textSize / 6); /* Allocate initial (empty) rows. These will be assigned actual locations in the cache once at least one glyph is stored. */ @@ -431,7 +431,7 @@ static void initCache_Text_(iText *d) { SDL_PIXELFORMAT_RGBA4444, SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, d->cacheSize.x, - d->cacheSize.y); + d->cacheSize.y); SDL_SetTextureBlendMode(d->cache, SDL_BLENDMODE_BLEND); } -- cgit v1.2.3