summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Podtelezhnikov <apodtele@gmail.com>2021-06-29 23:51:23 -0400
committerAlexei Podtelezhnikov <apodtele@gmail.com>2021-06-29 23:51:23 -0400
commit69c3516c88cf1fc9814ec70f9984072b4c3c04a0 (patch)
treed97a49cf25c019d48e5b814583dd11951bf03ef1
parent3696ac5a18a6ff1a077eb8a3a2133b45e8fcde87 (diff)
downloadfreetype2-69c3516c88cf1fc9814ec70f9984072b4c3c04a0.tar.gz
[raster] Do not skip the second pass without dropout control.
The second pass also fixes horizontal lines through the pixel centers. * src/raster/ftraster.c (black_TWorker): Do not use `second_pass'. (Render_Glyph): Skip the second pass only with the appropriate flag.
-rw-r--r--ChangeLog9
-rw-r--r--src/raster/ftraster.c14
2 files changed, 12 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index f79fc69bf..9a2cabc9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+ [raster] Do not skip the second pass without dropout control.
+
+ The second pass also fixes horizontal lines through the pixel centers.
+
+ * src/raster/ftraster.c (black_TWorker): Do not use `second_pass'.
+ (Render_Glyph): Skip the second pass only with the appropriate flag.
+
+2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
+
[raster] Handle sub-band stack locally.
* src/raster/ftraster.c (black_TWorker): Move `band_stack' from here..
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 9b742f595..74c290879 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -483,6 +483,8 @@
Int numTurns; /* number of Y-turns in outline */
+ Byte dropOutControl; /* current drop_out control method */
+
UShort bWidth; /* target bitmap width */
PByte bOrigin; /* target bitmap bottom-left origin */
PByte bLine; /* target bitmap current line */
@@ -514,13 +516,6 @@
Function_Sweep_Span* Proc_Sweep_Drop;
Function_Sweep_Step* Proc_Sweep_Step;
- Byte dropOutControl; /* current drop_out control method */
-
- Bool second_pass; /* indicates whether a horizontal pass */
- /* should be performed to control */
- /* drop-out accurately when calling */
- /* Render_Glyph. */
-
};
@@ -3116,9 +3111,6 @@
ras.dropOutControl += 1;
}
- ras.second_pass = (Bool)( !( ras.outline.flags &
- FT_OUTLINE_SINGLE_PASS ) );
-
/* Vertical Sweep */
FT_TRACE7(( "Vertical pass (ftraster)\n" ));
@@ -3138,7 +3130,7 @@
return error;
/* Horizontal Sweep */
- if ( ras.second_pass && ras.dropOutControl != 2 )
+ if ( !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS ) )
{
FT_TRACE7(( "Horizontal pass (ftraster)\n" ));