* src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Apply font matrix to advance also. * docs/CHANGES: Updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
diff --git a/ChangeLog b/ChangeLog
index 6ea81f8..f748acc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-08-05 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
+ (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Apply
+ font matrix to advance also.
+ * docs/CHANGES: Updated.
+
2003-07-26 Werner Lemberg <wl@gnu.org>
* builds/unix/configure.ac (version_info): Set to 9:4:3.
diff --git a/docs/CHANGES b/docs/CHANGES
index c8e0d66..e74b077 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -17,6 +17,9 @@ LATEST CHANGES BETWEEN 2.1.5 and 2.1.4
- Numeric font dictionary entries for synthetic fonts are no longer
overwritten.
+ - The font matrix wasn't applied to the advance width for Type1, CID,
+ and CFF fonts.
+
- The test for the charset registry in BDF and PCF fonts is now
case-insensitive.
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 8440257..d9a10bc 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2411,6 +2411,7 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
+ FT_Vector advance;
/* copy the _unscaled_ advance width */
@@ -2440,6 +2441,14 @@
font_offset.x,
font_offset.y );
+ advance.x = metrics->horiAdvance;
+ advance.y = metrics->vertAdvance;
+ FT_Vector_Transform( &advance, &font_matrix );
+ advance.x += font_offset.x;
+ advance.y += font_offset.y;
+ metrics->horiAdvance = advance.x;
+ metrics->vertAdvance = advance.y;
+
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
/* scale the outline and the metrics */
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 9d18810..9136388 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -348,6 +348,7 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
+ FT_Vector advance;
/* copy the _unscaled_ advance width */
@@ -373,6 +374,14 @@
font_offset.x,
font_offset.y );
+ advance.x = metrics->horiAdvance;
+ advance.y = metrics->vertAdvance;
+ FT_Vector_Transform( &advance, &font_matrix );
+ advance.x += font_offset.x;
+ advance.y += font_offset.y;
+ metrics->horiAdvance = advance.x;
+ metrics->vertAdvance = advance.y;
+
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
/* scale the outline and the metrics */
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 4f46f35..49fb589 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -304,6 +304,7 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
+ FT_Vector advance;
/* copy the _unscaled_ advance width */
@@ -330,6 +331,14 @@
FT_Outline_Translate( &glyph->root.outline,
font_offset.x,
font_offset.y );
+
+ advance.x = metrics->horiAdvance;
+ advance.y = metrics->vertAdvance;
+ FT_Vector_Transform( &advance, &font_matrix );
+ advance.x += font_offset.x;
+ advance.y += font_offset.y;
+ metrics->horiAdvance = advance.x;
+ metrics->vertAdvance = advance.y;
#endif
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )