[gs-cvs] gs/src

Igor Melichev igor at casper.ghostscript.com
Tue Jul 16 09:47:41 PDT 2002


Update of /cvs/ghostscript/gs/src
In directory casper:/tmp/cvs-serv32107/gs/src

Modified Files:
	zchar1.c 
Log Message:
Fix: Results of zchar_get_metrics2 were missinterpreted.


Index: zchar1.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/zchar1.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- zchar1.c	16 Jun 2002 03:43:50 -0000	1.19
+++ zchar1.c	16 Jul 2002 16:47:39 -0000	1.20
@@ -949,7 +949,7 @@
     ref *pcdevproc;
     int value;
     gs_imager_state gis;
-    double sbw[4];
+    double sbw[4], wv[4];
     gs_point mpt;
 
     pdata = &pfont1->data;
@@ -960,7 +960,11 @@
 	return_error(e_rangecheck); /* can't call CDevProc from here */
     switch (pfont1->WMode) {
     default:
-	code = zchar_get_metrics2((gs_font_base *)pfont1, pgref, sbw);
+	code = zchar_get_metrics2((gs_font_base *)pfont1, pgref, wv);
+	sbw[0] = wv[2];
+	sbw[1] = wv[3];
+	sbw[2] = wv[0];
+	sbw[3] = wv[1];
 	if (code)
 	    break;
 	/* falls through */
@@ -1029,7 +1033,6 @@
     gs_font_base *const pbfont = (gs_font_base *)font;
     int wmode = pfont->WMode;
     const ref *pfdict = &pfont_data(pbfont)->dict;
-    double sbw[4];
     int width_members = members & (GLYPH_INFO_WIDTH0 << wmode);
     int outline_widths = members & GLYPH_INFO_OUTLINE_WIDTHS;
     bool modified_widths = false;
@@ -1041,16 +1044,18 @@
 	return gs_type1_glyph_info(font, glyph, pmat, members, info);
     glyph_ref(glyph, &gref);
     if (width_members == GLYPH_INFO_WIDTH1) {
-	code = zchar_get_metrics2(pbfont, &gref, sbw);
+	double wv[4];
+	code = zchar_get_metrics2(pbfont, &gref, wv);
 	if (code > 0) {
 	    modified_widths = true;
-	    info->width[1].x = sbw[2];
-	    info->width[1].y = sbw[3];
+	    info->width[1].x = wv[0];
+	    info->width[1].y = wv[1];
 	    done_members = width_members;
 	    width_members = 0;
 	}
     }
     if (width_members) {
+	double sbw[4];
 	code = zchar_get_metrics(pbfont, &gref, sbw);
 	if (code > 0) {
 	    modified_widths = true;




More information about the gs-cvs mailing list