From bd0c3e594e8e62ee0a1cdec4f68b62a8661a8a54 Mon Sep 17 00:00:00 2001 From: Anurag Thakur Date: Wed, 4 Oct 2023 00:37:16 +0530 Subject: [PATCH] dense fixes --- modules.cfg | 2 +- src/dense/ftdenserend.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules.cfg b/modules.cfg index c141b14ba..548893213 100644 --- a/modules.cfg +++ b/modules.cfg @@ -100,7 +100,7 @@ HINTING_MODULES += pshinter #### # Dense Rasterizer -#RASTER_MODULES += dense +RASTER_MODULES += dense # Anti-aliasing rasterizer. RASTER_MODULES += smooth diff --git a/src/dense/ftdenserend.c b/src/dense/ftdenserend.c index c9fbb0f22..00449111b 100644 --- a/src/dense/ftdenserend.c +++ b/src/dense/ftdenserend.c @@ -162,8 +162,8 @@ } /* translate outline to render it into the bitmap */ - if ( x_shift || y_shift ){ - FT_Outline_Translate( outline, x_shift, y_shift ); + if ( (x_shift || y_shift)&&!slot->prel_shifted ){ + //FT_Outline_Translate( outline, x_shift, y_shift ); FT_PreLine pl = slot->prelines; while (pl!=NULL) { @@ -174,6 +174,7 @@ pl = pl->next; } + slot->prel_shifted = 1; } @@ -198,8 +199,8 @@ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; } - if ( x_shift || y_shift ) - FT_Outline_Translate( outline, -x_shift, -y_shift ); + // if ( x_shift || y_shift ) + // FT_Outline_Translate( outline, -x_shift, -y_shift ); return error; }