Commit 1cfdeeec authored by Ian Pilcher's avatar Ian Pilcher Committed by Alexandre Julliard

Squash another AFM character metrics parsing bug.

parent f5242405
...@@ -43,15 +43,17 @@ static void PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp) ...@@ -43,15 +43,17 @@ static void PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp)
afm->NumofMetrics * sizeof(AFMMETRICS) ); afm->NumofMetrics * sizeof(AFMMETRICS) );
for(i = 0; i < afm->NumofMetrics; i++, metric++) { for(i = 0; i < afm->NumofMetrics; i++, metric++) {
if(!fgets(line, sizeof(line), fp)) {
ERR("Unexpected EOF\n");
return;
}
cp = line + strlen(line);
do { do {
*cp = '\0'; if(!fgets(line, sizeof(line), fp)) {
cp--; ERR("Unexpected EOF\n");
} while(cp >= line && isspace(*cp)); return;
}
cp = line + strlen(line);
do {
*cp = '\0';
cp--;
} while(cp >= line && isspace(*cp));
} while (!(*line));
curpos = line; curpos = line;
while(*curpos) { while(*curpos) {
...@@ -103,11 +105,9 @@ static void PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp) ...@@ -103,11 +105,9 @@ static void PSDRV_AFMGetCharMetrics(AFM *afm, FILE *fp)
curpos = endpos + 1; curpos = endpos + 1;
} }
#if 0
TRACE("Metrics for '%s' WX = %f B = %f,%f - %f,%f\n", TRACE("Metrics for '%s' WX = %f B = %f,%f - %f,%f\n",
metric->N, metric->WX, metric->B.llx, metric->B.lly, metric->N, metric->WX, metric->B.llx, metric->B.lly,
metric->B.urx, metric->B.ury); metric->B.urx, metric->B.ury);
#endif
} }
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment