[renderer] Reduce glyph pixel area padding from 2x to 1.2x

With the improved atlas allocation, 2x is no longer needed and 1.2x
seems to be sufficient. Most importantly, it reduced the texture for
amiri-regular.ttf at 72 pix height from 8x to 4x (the staging buffer
isn't big enough for 8k textures).
This commit is contained in:
Bill Currie 2022-10-07 16:58:04 +09:00
parent 4feffd2de5
commit 8120adb455

View file

@ -103,7 +103,7 @@ R_FontLoad (QFile *font_file, int size)
__auto_type g = font->face->glyph;
pixels += g->bitmap.width * g->bitmap.rows;
}
pixels = sqrt (2 * pixels);
pixels = sqrt (5 * pixels / 4);
pixels = BITOP_RUP (pixels);
R_ScrapInit (&font->scrap, pixels, pixels);
font->scrap_bitmap = calloc (1, pixels * pixels);