summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-01 14:45:48 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-01 14:45:48 +0200
commit5538d31f897f5b394f314bf499513d559f56407f (patch)
tree10cead3a8a908bde739b294df69c89825a025be6 /src
parentdf2b288cf9cea0032e8df1f8b5113da7ed8acfa5 (diff)
Text: Caching the tallest glyphs
Reserve one more glyph cache row size so the tallest glyphs fit.
Diffstat (limited to 'src')
-rw-r--r--src/ui/text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/text.c b/src/ui/text.c
index 25e0da34..3a9b6983 100644
--- a/src/ui/text.c
+++ b/src/ui/text.c
@@ -332,7 +332,7 @@ static void initCache_Text_(iText *d) {
332 d->cacheRowAllocStep = iMax(2, textSize / 6); 332 d->cacheRowAllocStep = iMax(2, textSize / 6);
333 /* Allocate initial (empty) rows. These will be assigned actual locations in the cache 333 /* Allocate initial (empty) rows. These will be assigned actual locations in the cache
334 once at least one glyph is stored. */ 334 once at least one glyph is stored. */
335 for (int h = d->cacheRowAllocStep; h <= 2 * textSize; h += d->cacheRowAllocStep) { 335 for (int h = d->cacheRowAllocStep; h <= 2 * textSize + d->cacheRowAllocStep; h += d->cacheRowAllocStep) {
336 pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 }); 336 pushBack_Array(&d->cacheRows, &(iCacheRow){ .height = 0 });
337 } 337 }
338 d->cacheBottom = 0; 338 d->cacheBottom = 0;