summaryrefslogtreecommitdiff
path: root/src/ui/text.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-09 12:50:40 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-09 12:50:40 +0300
commitaeaf46c5ac708bc225ea4095b7ce8fc607c74867 (patch)
tree43ba5f5f70504482da5a8e3b9210b50942ae818b /src/ui/text.c
parentd197e02ae35d8439c80106db6ce1c561499e5629 (diff)
Preferences: Selecting fonts to use
Now all the available fonts are selectable in the dialog. Added preformatted and UI font settings and shuffled the order a bit to make more sense.
Diffstat (limited to 'src/ui/text.c')
-rw-r--r--src/ui/text.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index 14b4e305..3ed5b327 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -472,7 +472,8 @@ static void deinitFonts_Text_(iText *d) {
472} 472}
473 473
474static int maxGlyphHeight_Text_(const iText *d) { 474static int maxGlyphHeight_Text_(const iText *d) {
475 return 2 * d->contentFontSize * fontSize_UI; 475 /* Huge size is 2 * contentFontSize. */
476 return 4 * d->contentFontSize * fontSize_UI;
476} 477}
477 478
478static void initCache_Text_(iText *d) { 479static void initCache_Text_(iText *d) {
@@ -491,7 +492,7 @@ static void initCache_Text_(iText *d) {
491 /* Allocate initial (empty) rows. These will be assigned actual locations in the cache 492 /* Allocate initial (empty) rows. These will be assigned actual locations in the cache
492 once at least one glyph is stored. */ 493 once at least one glyph is stored. */
493 for (int h = d->cacheRowAllocStep; 494 for (int h = d->cacheRowAllocStep;
494 h <= 2.5 * textSize + d->cacheRowAllocStep; 495 h <= 5 * textSize + d->cacheRowAllocStep;
495 h += d->cacheRowAllocStep) { 496 h += d->cacheRowAllocStep) {
496 pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 }); 497 pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 });
497 } 498 }