Go to file
Bram Tassyns 4694ea2b95 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.
2009-09-02 13:06:33 +02:00
builds gxvalid: Insert PureC pragma to allow unevaluated variables. 2009-08-01 00:30:11 +09:00
devel * devel/ftoption.h [FT_CONFIG_OPTION_INCREMENTAL]: Define. 2009-06-28 00:40:05 +02:00
docs Fix rendering of horizontally compressed CFFs. 2009-08-27 00:10:56 +02:00
include Fix custom cmap for empty Type 1 font (Savannah bug #27294). 2009-09-01 08:10:24 +02:00
objs Minor change for testing purposes. 2006-05-09 08:31:39 +00:00
src Improve vertical metrics calculation (Savannah bug #27364). 2009-09-02 13:06:33 +02:00
.cvsignore Formatting. 2000-10-31 19:42:53 +00:00
ChangeLog Improve vertical metrics calculation (Savannah bug #27364). 2009-09-02 13:06:33 +02:00
ChangeLog.20 Add one more example to the documentation of FT_Glyph_To_Bitmap. 2008-08-06 09:09:41 +00:00
ChangeLog.21 Formatting, copyright years. 2008-07-27 06:27:21 +00:00
ChangeLog.22 Formatting, copyright years. 2008-07-27 06:27:21 +00:00
Jamfile More preparations for 2.3.9 release. 2009-03-09 18:06:28 +00:00
Jamrules Add license. 2005-06-04 23:04:30 +00:00
Makefile * Makefile, *.mk: Use `?=' where appropriate. 2006-02-01 07:52:11 +00:00
README More preparations for 2.3.9 release. 2009-03-09 18:06:28 +00:00
README.git README.CVS -> README.git 2009-07-15 07:50:06 +02:00
autogen.sh Don't rely on GNU sed. 2009-01-06 21:00:47 +00:00
configure Formatting. 2009-06-28 00:37:53 +02:00
modules.cfg Move FT_Get_FSType_Flags to a separate file. 2009-01-22 10:13:59 +00:00
version.sed Put version information into the configure script. Reported by Paul 2006-05-08 07:10:29 +00:00
vms_make.com typo 2007-02-12 14:35:15 +00:00

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