• Show log

    Commit

  • Hash : 4694ea2b
    Author : Bram Tassyns
    Date : 2009-09-02T13:06:33

    Improve vertical metrics calculation (Savannah bug #27364).
    
    The calculation of `vertBearingX' is not defined in the OTF font
    spec so FreeType does a `best effort' attempt.  However, this value
    is defined in the PDF and PostScript specs, and that algorithm is
    better than the one FreeType currently uses:
    
      FreeType: Use the middle of the bounding box as the X coordinate
                of the vertical origin.
    
      Adobe PDF spec: Use the middle of the horizontal advance vector as
                      the X coordinate of the vertical origin.
    
    FreeType's algorithm goes wrong if you have a really small glyph
    (like the full-width, circle-like dot at the end of the sentence, as
    used in CJK scripts) with large bearings.  With the FreeType
    algorithm this dot gets centered on the baseline; with the PDF
    algorithm it gets the correct location (in the top right).  Note
    that this is a serious issue, it's like printing the dot at the end
    of a Roman sentence at the center of the textline instead of on the
    baseline like it should. So i believe the PDF spec's algorithm
    should be used in FreeType as well.
    
    The `vertBearingY' value for such small glyphs is also very strange
    if no `vmtx' information is present, since the height of the bbox is
    not representable for the height of the glyph visually (the
    whitespace up to the baseline is part of the glyph).  The fix also
    includes some code for a better estimate of `vertBearingY'.
    
    * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX'
    is now calculated as described by the Adobe PDF Spec.  Estimate for
    `vertBearingY' now works better for small glyphs completely above or
    below the baseline into account.
    
    * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now
    calculated as described by the Adobe PDF Spec.  Vertical metrics
    information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS
    was not defined.
    
    * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is
    now calculated as described by the Adobe PDF Spec.
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/freetype.git
    Git SSH git@git.kmx.io:kc3-lang/freetype.git
    Public access ? public
    Description
    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg thodg_l
    Tags

  • 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 ---