freetype/include/freetype
Werner Lemberg 7227114043 Fix B/W rasterization of subglyphs with different drop-out modes.
Normally, the SCANMODE instruction (if present) to set the drop-out
mode in a TrueType font is located in the `prep' table only and thus
valid for all glyphs.  However, there are fonts like `pala.ttf'
which additionally contain this instruction in the hinting code of
some glyphs (but not all).  As a result it can happen that a
composite glyph needs multiple drop-out modes for its subglyphs
since the rendering state gets reset for each subglyph.

FreeType collects the hinted outlines from all subglyphs, then it
sends the data to the rasterizer.  It also sends the drop-out mode
-- after hinting has been applied -- and here is the error: It sends
the drop-out mode of the last subglyph only; drop-out modes of all
other subglyphs are lost.

This patch fixes the problem; it adds a second, alternative
mechanism to pass the drop-out mode: For each contour, the
rasterizer now checks the first `tags' array element.  If bit 2 is
set, bits 5-7 contain the contour's drop-out mode, overriding the
global drop-out mode.

* include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro.

* src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in
`tags[0]'.

* src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom):
Use bits 3-5 instead of 0-2.
(New_Profile): Set the drop-out mode in the profile's `flags' field.
(Decompose_Curve): Check `tags[0]' and set `dropOutControl' if
necessary.
(Vertical_Sweep_Drop, Horizontal_Sweep_Drop,
Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out
mode.
2009-06-18 15:42:52 +02:00
..
config Position Independent Code (PIC) support and infrastructure in base. 2009-04-05 17:59:26 +03:00
internal Position Independent Code (PIC) support in autofit module. 2009-04-05 18:23:38 +03:00
freetype.h Typo. 2009-03-31 18:11:55 +02:00
ftadvanc.h load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_Int32 to match the flags of FT_Load_Glyph() 2009-01-09 11:11:53 +00:00
ftbbox.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftbdf.h * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve documentation. 2009-01-11 11:45:54 +00:00
ftbitmap.h * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move 2008-12-17 10:50:31 +00:00
ftcache.h * devel/ftoption.h, include/freetype/config/ftoption.h 2008-11-05 14:34:29 +00:00
ftchapters.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftcid.h Typo. 2009-03-11 21:39:10 +00:00
fterrdef.h * include/freetype/fterrdef.h (FT_Err_Corrupted_Font_Header, 2007-06-01 22:16:43 +00:00
fterrors.h Typo. From Han-Wen. 2007-01-23 06:29:23 +00:00
ftgasp.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftglyph.h Minor typos. 2009-03-03 14:26:47 +00:00
ftgxval.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftgzip.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftimage.h Fix B/W rasterization of subglyphs with different drop-out modes. 2009-06-18 15:42:52 +02:00
ftincrem.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftlcdfil.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ftlist.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftlzw.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftmac.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftmm.h Documentation fixes. 2009-01-19 08:35:45 +00:00
ftmodapi.h * devel/ftoption.h, include/freetype/config/ftoption.h 2008-11-05 14:34:29 +00:00
ftmoderr.h * docs/CHANGES, docs/INSTALL.ANY: Updated. 2005-03-23 16:45:24 +00:00
ftotval.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftoutln.h Fix documentation buglets. 2009-01-19 14:31:53 +00:00
ftpfr.h Documentation fixes. 2009-01-19 08:47:43 +00:00
ftrender.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftsizes.h Documentation fixes. 2009-01-19 08:35:45 +00:00
ftsnames.h Improve documentation. 2009-04-04 09:26:18 +02:00
ftstroke.h Fix documentation of FT_Outline_GetInsideBorder. 2009-01-18 06:42:59 +00:00
ftsynth.h * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move 2008-12-17 10:50:31 +00:00
ftsystem.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
fttrigon.h More typo fixes from Alexei. 2007-01-30 23:08:50 +00:00
fttypes.h Whitespace. 2009-03-15 20:58:38 +01:00
ftwinfnt.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
ftxf86.h Improve navigation in API reference. 2008-06-26 19:56:51 +00:00
t1tables.h Remove ABI-breaking field in public PS_InfoFontRec definition. 2009-03-03 13:28:59 +00:00
ttnameid.h * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards 2008-11-08 22:00:55 +00:00
tttables.h Documentation fixes. 2009-01-19 08:47:43 +00:00
tttags.h formatting 2008-10-05 06:08:40 +00:00
ttunpat.h * src/tools/docmaker/sources.py (re_source_keywords): Add word 2006-05-12 08:00:13 +00:00