[gs-cvs] rev 7046 - trunk/gs/src
leonardo at ghostscript.com
leonardo at ghostscript.com
Thu Sep 14 05:15:43 PDT 2006
Author: leonardo
Date: 2006-09-14 05:15:43 -0700 (Thu, 14 Sep 2006)
New Revision: 7046
Modified:
trunk/gs/src/gxhintn.c
Log:
Fix (type1 hinter) : Delayedly adjust matrix precision with sbw data.
DETAILS :
Bug 688875 "type1 hinter: Valgrind reports uninitialized data".
The old code initializes matrices after importing data from sbw instruction.
If an sbw argument is big, t1_hinter__adjust_matrix_precision
adjusts the ctmf matrix coeffitients, which appear uninitialized
at that time.
In most cases the bug has no consequences besides bothering Valgrind.
Only a harmful case was a big glyph width after small coordinates of all outline poles.
We don't know whether it practically appears.
The new code delays the accounting sbw arguments for the
time when all poles are imported. At that time ctmf
is definitely initialized, and the trailing moveto
already accounted the glyph width. So it only needs to account
the glyph origin for the case when its coordinate is
a big negative number (a pretty rare case though).
EXPECTED DIFFERENCES :
None.
Modified: trunk/gs/src/gxhintn.c
===================================================================
--- trunk/gs/src/gxhintn.c 2006-09-14 04:31:59 UTC (rev 7045)
+++ trunk/gs/src/gxhintn.c 2006-09-14 12:15:43 UTC (rev 7046)
@@ -938,9 +938,7 @@
}
int t1_hinter__sbw(t1_hinter * this, fixed sbx, fixed sby, fixed wx, fixed wy)
-{ t1_hinter__adjust_matrix_precision(this, sbx, sby);
- t1_hinter__adjust_matrix_precision(this, wx, wy);
- this->cx = this->orig_gx = this->subglyph_orig_gx = sbx;
+{ this->cx = this->orig_gx = this->subglyph_orig_gx = sbx;
this->cy = this->orig_gy = this->subglyph_orig_gy = sby;
this->width_gx = wx;
this->width_gy = wy;
@@ -2968,6 +2966,7 @@
if (code < 0)
goto exit;
t1_hinter__paint_glyph(this, false);
+ t1_hinter__adjust_matrix_precision(this, this->orig_gx, this->orig_gy);
t1_hinter__compute_y_span(this);
t1_hinter__simplify_representation(this);
if (!this->disable_hinting && (this->grid_fit_x || this->grid_fit_y)) {
More information about the gs-cvs
mailing list