Al-Qurtas-Islamic-bank-The-.../src/truetype
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
..
Jamfile Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
module.mk FT_USE_MODULE declares things as: 2008-12-21 10:29:30 +00:00
rules.mk * src/pcf/pcfdrivr.c: Revert change from 2004-04-17. 2004-04-25 20:15:11 +00:00
truetype.c Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
ttdriver.c Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
ttdriver.h Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
tterrors.h Formatting. 2001-06-19 23:03:41 +00:00
ttgload.c Fix B/W rasterization of subglyphs with different drop-out modes. 2009-06-18 15:42:52 +02:00
ttgload.h * autogen.sh, builds/unix/configure.raw, 2008-09-12 16:27:48 +00:00
ttgxvar.c Really fix Ghostscript Coverity issue #3904. 2009-03-21 10:45:18 +01:00
ttgxvar.h Remove trailing whitespace. From Alexei. 2007-01-16 06:11:27 +00:00
ttinterp.c Fix some potential out-of-memory crashes. 2009-06-07 13:09:21 +02:00
ttinterp.h more formatting and copyright years 2007-02-12 22:01:18 +00:00
ttobjs.c Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
ttobjs.h Typo. 2009-06-16 22:41:46 +02:00
ttpic.c Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
ttpic.h Position Independent Code (PIC) support in truetype driver. 2009-04-05 18:03:02 +03:00
ttpload.c Fix comment. 2009-04-04 07:51:45 +02:00
ttpload.h * builds/win32/visualc/freetype.dsp: updating the project file, adding 2006-03-20 13:32:33 +00:00