• Show log

    Commit

  • Hash : 72271140
    Author : Werner Lemberg
    Date : 2009-06-18T15:42:52

    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.

  • README

  •   Special notes to Unix users
      ===========================
    
      Please  read  the file  `docs/UPGRADE.UNIX'.  It contains  important
      information regarding the installation  of FreeType on Unix systems,
      especially GNU based operating systems like GNU/Linux.
    
      FreeType 2's  library is called `libfreetype',  FreeType 1's library
      is called `libttf'.  They are *not* compatible!
    
    
      FreeType 2.3.9
      ==============
    
      Please   read   the  docs/CHANGES   file,   it  contains   IMPORTANT
      INFORMATION.
    
      Read the files `docs/INSTALL' for installation instructions.
    
      The FreeType 2 API reference is located in `docs/reference'; use the
      file   `ft2-doc.html'   as   the   top  entry   point.    Additional
      documentation is available as a separate package from our sites.  Go
      to
    
        http://download.savannah.gnu.org/releases/freetype/
    
      and download one of the following files.
    
        freetype-doc-2.3.9.tar.bz2
        freetype-doc-2.3.9.tar.gz
        ftdoc239.zip
    
    
      Bugs
      ====
    
      Please report bugs  by e-mail to `freetype-devel@nongnu.org'.  Don't
      forget to  send a  detailed explanation of  the problem --  there is
      nothing  worse than  receiving a  terse message  that only  says `it
      doesn't work'.
    
      Alternatively, you may submit a bug report at
    
        https://savannah.nongnu.org/bugs/?group=freetype
    
    
      Enjoy!
    
    
        The FreeType Team
    
    ----------------------------------------------------------------------
    
    Copyright 2006, 2007, 2008, 2009 by
    David Turner, Robert Wilhelm, and Werner Lemberg.
    
    This  file is  part of  the FreeType  project, and  may only  be used,
    modified,  and distributed  under the  terms of  the  FreeType project
    license,  LICENSE.TXT.  By  continuing to  use, modify,  or distribute
    this file you  indicate that you have read  the license and understand
    and accept it fully.
    
    
    --- end of README ---