summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-11 06:09:50 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-11 06:09:50 +0200
commit43a369fc00e331c377f95c53c4d975e7d6f121a0 (patch)
tree06e8915b0bbd59de2c7dd708d3474f01feeb87c6
parentda9bd1a8fa18ee958baebb204ef7a2a18972a6ad (diff)
Bring back regular-bold Nunito for links
The extra bold that is used for titles is too bold for links.
-rw-r--r--CMakeLists.txt1
-rw-r--r--res/fonts/Nunito-Bold.ttfbin0 -> 176492 bytes
-rw-r--r--src/ui/text.c6
3 files changed, 4 insertions, 3 deletions
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
63 res/fonts/NanumGothic-Regular.ttf 63 res/fonts/NanumGothic-Regular.ttf
64 res/fonts/NotoEmoji-Regular.ttf 64 res/fonts/NotoEmoji-Regular.ttf
65 res/fonts/NotoSansJP-Regular.ttf 65 res/fonts/NotoSansJP-Regular.ttf
66 res/fonts/Nunito-Bold.ttf
66 res/fonts/Nunito-ExtraBold.ttf 67 res/fonts/Nunito-ExtraBold.ttf
67 res/fonts/Nunito-ExtraLight.ttf 68 res/fonts/Nunito-ExtraLight.ttf
68 res/fonts/Nunito-LightItalic.ttf 69 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
--- /dev/null
+++ b/res/fonts/Nunito-Bold.ttf
Binary files 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) {
210 const float monoSize = textSize * 0.71f; 210 const float monoSize = textSize * 0.71f;
211 const float smallMonoSize = monoSize * 0.8f; 211 const float smallMonoSize = monoSize * 0.8f;
212 const iBlock *regularFont = &fontNunitoRegular_Embedded; 212 const iBlock *regularFont = &fontNunitoRegular_Embedded;
213 const iBlock *boldFont = &fontNunitoExtraBold_Embedded; 213 const iBlock *boldFont = &fontNunitoBold_Embedded;
214 const iBlock *italicFont = &fontNunitoLightItalic_Embedded; 214 const iBlock *italicFont = &fontNunitoLightItalic_Embedded;
215 const iBlock *h12Font = &fontNunitoExtraBold_Embedded; 215 const iBlock *h12Font = &fontNunitoExtraBold_Embedded;
216 const iBlock *h3Font = &fontNunitoRegular_Embedded; 216 const iBlock *h3Font = &fontNunitoRegular_Embedded;
@@ -418,7 +418,7 @@ static void initCache_Text_(iText *d) {
418 if (renderInfo.max_texture_height > 0 && d->cacheSize.y > renderInfo.max_texture_height) { 418 if (renderInfo.max_texture_height > 0 && d->cacheSize.y > renderInfo.max_texture_height) {
419 d->cacheSize.y = renderInfo.max_texture_height; 419 d->cacheSize.y = renderInfo.max_texture_height;
420 d->cacheSize.x = renderInfo.max_texture_width; 420 d->cacheSize.x = renderInfo.max_texture_width;
421 } 421 }
422 d->cacheRowAllocStep = iMax(2, textSize / 6); 422 d->cacheRowAllocStep = iMax(2, textSize / 6);
423 /* Allocate initial (empty) rows. These will be assigned actual locations in the cache 423 /* Allocate initial (empty) rows. These will be assigned actual locations in the cache
424 once at least one glyph is stored. */ 424 once at least one glyph is stored. */
@@ -431,7 +431,7 @@ static void initCache_Text_(iText *d) {
431 SDL_PIXELFORMAT_RGBA4444, 431 SDL_PIXELFORMAT_RGBA4444,
432 SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET, 432 SDL_TEXTUREACCESS_STATIC | SDL_TEXTUREACCESS_TARGET,
433 d->cacheSize.x, 433 d->cacheSize.x,
434 d->cacheSize.y); 434 d->cacheSize.y);
435 SDL_SetTextureBlendMode(d->cache, SDL_BLENDMODE_BLEND); 435 SDL_SetTextureBlendMode(d->cache, SDL_BLENDMODE_BLEND);
436} 436}
437 437