summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2004-02-26 09:08:51 +0000
committerWerner Lemberg <wl@gnu.org>2004-02-26 09:08:51 +0000
commit113923175767f5863588bea8fba50f208a3eeb8d (patch)
tree01c51bdb0b1e7c52c20fdee90847d64032897f46
parentf85a2c3910ce82e5ce274d2c77bc5e195095c020 (diff)
downloadfreetype2-113923175767f5863588bea8fba50f208a3eeb8d.tar.gz
* src/autohint/ahhint.c (ah_hinter_load) <FT_GLYPH_FORMAT_OUTLINE>:
Handle case where outline->num_vedges is zero while computing hinted metrics. * src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value for `count'.
-rw-r--r--ChangeLog11
-rw-r--r--src/autohint/ahhint.c7
-rw-r--r--src/cff/cffcmap.c4
3 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 271e04033..92105ee3f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-02-24 Malcolm Taylor <mtaylor@clear.net.nz>
+
+ * src/autohint/ahhint.c (ah_hinter_load) <FT_GLYPH_FORMAT_OUTLINE>:
+ Handle case where outline->num_vedges is zero while computing hinted
+ metrics.
+
+2004-02-24 Gordon Childs <gchilds@quickcut.com.au>
+
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value
+ for `count'.
+
2004-02-24 Werner Lemberg <wl@gnu.org>
* include/freetype/t1tables.h (PS_PrivateRec): Add
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
index a79e19db6..37aea1ee6 100644
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -1540,6 +1540,7 @@
/* we now need to hint the metrics according to the change in */
/* width/positioning that occured during the hinting process */
+ if ( outline->num_vedges > 0 )
{
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
AH_Edge edge1 = outline->vert_edges; /* leftmost edge */
@@ -1562,6 +1563,12 @@
#endif
}
+ else
+ {
+ hinter->pp1.x = ( hinter->pp1.x + 32 ) & -64;
+ hinter->pp2.x = ( hinter->pp2.x + 32 ) & -64;
+ }
+
/* good, we simply add the glyph to our loader's base */
ah_loader_add( gloader );
break;
diff --git a/src/cff/cffcmap.c b/src/cff/cffcmap.c
index c50718a74..0c2e44e52 100644
--- a/src/cff/cffcmap.c
+++ b/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -152,7 +152,7 @@
cmap->num_pairs = 0;
cmap->pairs = NULL;
- count = (FT_UInt)face->root.num_glyphs;
+ count = cff->num_glyphs;
if ( !FT_NEW_ARRAY( cmap->pairs, count ) )
{