Fix subpixel scanline size for fonts with bitmaps

Fixes #16788

Change-Id: If4c5a6e37ab5950c2426286d5afab59652a2a61b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3743
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Máximo Castañeda
2021-02-28 11:16:22 +00:00
committed by Adrien Destugues
parent 1eac17132d
commit 6c04dd4898
+4 -1
View File
@@ -368,7 +368,10 @@ decompose_ft_bitmap_subpix(const FT_Bitmap& bitmap, int x, int y,
{
const uint8* buf = (const uint8*)bitmap.buffer;
int pitch = bitmap.pitch;
sl.reset(x, x + bitmap.width / 3);
if (bitmap.pixel_mode == FT_PIXEL_MODE_MONO)
sl.reset(x, x + bitmap.width);
else
sl.reset(x, x + bitmap.width / 3);
storage.prepare();
if (flip_y) {