[haiku-commits] haiku: hrev54966 - src/servers/app/font

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 28 Feb 2021 11:16:24 +0000 (UTC)

hrev54966 adds 1 changeset to branch 'master'
old head: 1eac17132d74243536a9319f66b690c47b8c37d4
new head: 6c04dd4898301fab930a3836a275c8598fc25607
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=6c04dd489830+%5E1eac17132d74

----------------------------------------------------------------------------

6c04dd489830: 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 <pulkomandy@xxxxxxxxx>

                                    [ Máximo Castañeda <antiswen@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54966
Commit:      6c04dd4898301fab930a3836a275c8598fc25607
URL:         https://git.haiku-os.org/haiku/commit/?id=6c04dd489830
Author:      Máximo Castañeda <antiswen@xxxxxxxx>
Date:        Tue Feb 16 14:00:25 2021 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Sun Feb 28 11:16:22 2021 UTC

Ticket:      https://dev.haiku-os.org/ticket/16788

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 1 deletion(-)
src/servers/app/font/FontEngine.cpp | 5 ++++-

----------------------------------------------------------------------------

diff --git a/src/servers/app/font/FontEngine.cpp 
b/src/servers/app/font/FontEngine.cpp
index 86ead20fce..1c7e39cdf0 100644
--- a/src/servers/app/font/FontEngine.cpp
+++ b/src/servers/app/font/FontEngine.cpp
@@ -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) {


Other related posts:

  • » [haiku-commits] haiku: hrev54966 - src/servers/app/font - Adrien Destugues