forked from minhngoc25a/freetype2
[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.
This commit is contained in:
parent
3696ac5a18
commit
69c3516c88
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
[raster] Handle sub-band stack locally.
|
[raster] Handle sub-band stack locally.
|
||||||
|
|
|
@ -483,6 +483,8 @@
|
||||||
|
|
||||||
Int numTurns; /* number of Y-turns in outline */
|
Int numTurns; /* number of Y-turns in outline */
|
||||||
|
|
||||||
|
Byte dropOutControl; /* current drop_out control method */
|
||||||
|
|
||||||
UShort bWidth; /* target bitmap width */
|
UShort bWidth; /* target bitmap width */
|
||||||
PByte bOrigin; /* target bitmap bottom-left origin */
|
PByte bOrigin; /* target bitmap bottom-left origin */
|
||||||
PByte bLine; /* target bitmap current line */
|
PByte bLine; /* target bitmap current line */
|
||||||
|
@ -514,13 +516,6 @@
|
||||||
Function_Sweep_Span* Proc_Sweep_Drop;
|
Function_Sweep_Span* Proc_Sweep_Drop;
|
||||||
Function_Sweep_Step* Proc_Sweep_Step;
|
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.dropOutControl += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ras.second_pass = (Bool)( !( ras.outline.flags &
|
|
||||||
FT_OUTLINE_SINGLE_PASS ) );
|
|
||||||
|
|
||||||
/* Vertical Sweep */
|
/* Vertical Sweep */
|
||||||
FT_TRACE7(( "Vertical pass (ftraster)\n" ));
|
FT_TRACE7(( "Vertical pass (ftraster)\n" ));
|
||||||
|
|
||||||
|
@ -3138,7 +3130,7 @@
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
/* Horizontal Sweep */
|
/* Horizontal Sweep */
|
||||||
if ( ras.second_pass && ras.dropOutControl != 2 )
|
if ( !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS ) )
|
||||||
{
|
{
|
||||||
FT_TRACE7(( "Horizontal pass (ftraster)\n" ));
|
FT_TRACE7(( "Horizontal pass (ftraster)\n" ));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue