ref: e8ff769c7f3de0698a9e5c502b8b4a4e6b04bac8
parent: 42284f98f25adce8d5c8af46e591da26ca5f1725
author: Werner Lemberg <[email protected]>
date: Wed Aug 6 00:40:48 EDT 2003
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-08-05 Werner Lemberg <[email protected]>
+
+ * 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 <[email protected]>
* builds/unix/configure.ac (version_info): Set to 9:4:3.
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -17,6 +17,9 @@
- 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.
--- 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 */
@@ -2439,6 +2440,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;
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
--- 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 */
@@ -372,6 +373,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;
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
--- 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 )