[gs-bugs] [Bug 690589] New: difference in fontmetrics AFS/UFST on
certain fonts
bugs.ghostscript.com-bugzilla-daemon at ghostscript.com
bugs.ghostscript.com-bugzilla-daemon at ghostscript.com
Thu Jul 2 03:37:30 PDT 2009
http://bugs.ghostscript.com/show_bug.cgi?id=690589
Summary: difference in fontmetrics AFS/UFST on certain fonts
Product: GhostPCL
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P4
Component: PCL fonts
AssignedTo: henry.stiles at artifex.com
ReportedBy: norbert.janssen at oce.com
QAContact: gs-bugs at ghostscript.com
When printing attached testfile (metricstest.pcl) with PL_SCALER afs/ufst
you see a difference in the metrics.
AFS has the same metrics as HP LJ.
UFST is too large.
The problem is probably that the font used (Arial in UFST is not recognized as
being a scaling_technology == plfst_TrueType in pctext.c::pcl_get_width()
The fix is to add a check on a few specific typefaces, to be compatible with the
HP LJ.
static floatp
pcl_get_width(pcl_state_t *pcs, gs_point *advance_vector, const gs_point
*pscale, gs_char chr, bool is_space)
{
pcl_font_selection_t * pfp = &(pcs->font_selection[pcs->font_selected]);
floatp width;
if (chr != 0xffff) {
if (!pfp->params.proportional_spacing || is_space)
width = pcl_hmi(pcs);
else {
if ( pcs->font->scaling_technology == plfst_TrueType
#ifdef HP_COMPATIBLE
||
((pfp->params.typeface_family & 0x0fff) == 218 || /* Arial */
(pfp->params.typeface_family & 0x0fff) == 517 || /* Times New Roman */
(pfp->params.typeface_family & 0x0fff) == 302 || /* Symbol */
(pfp->params.typeface_family & 0x0fff) == 2730 /* Wingdings */
)
#endif
)
{
floatp tmp;
tmp = pscale->x / (floatp)pcs->uom_cp + 0.5;
tmp -= fmod(tmp, (floatp)1.0);
tmp *= (floatp)pcs->uom_cp;
width = advance_vector->x * tmp;
} else
width = advance_vector->x * pscale->x;
width += (floatp)pcs->uom_cp / 2.0;
width -= fmod(width, (floatp)pcs->uom_cp);
}
} else if (is_space)
width = pcl_hmi(pcs);
else
width = 0.0;
/* round to nearest integral pcl units */
return width;
}
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the gs-bugs
mailing list