[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] helvetica narrow metrics
From: |
Ian Brown |
Subject: |
[Devel] helvetica narrow metrics |
Date: |
Wed, 23 Jul 2003 13:38:24 +0200 |
I have a strange problem with the helvetica narrow font (HVN_____.PFB). When
a find the character widths for this font, the values I get back are too
large ... in fact they are identical to normal helvetica (HV______.PFB).
This is quite a serious issue because this means my wordwrap and
right-justification calculations are all wrong (postscript calculates the
widths correctly ... i.e. differently than freetype).
I have tried both freetype 2.1.3 and 2.1.4 (both under windows 2000) and
they produce identical results.
The code I use to get the widths looks like this:
DS_FTFace face(filename);
if (face.okay()){
face.SetCharSize(ptsize, dpi);
for (int i=32; i<256; ++i) {
if (face.LoadANSICharacter(i, NULL)){
int w_dots = (face.GetHorizontalAdvance() + 31) / 64;
m_width_table[i] = (short)w_dots;
ASSERT(w_dots > 0);
} else {
TRACE1("Error loading glyph %d\n", i);
}
}
where DS_FTFace is just a thin C++ wrapper around the freetype library.
As far as I can tell, all other fonts give the correct results. Still, in
this case either my code or freetype's code must be doing something wrong
because the horizontal advances generated by ghostscript and distiller for
this font (Helvetica Narrow) are quite different than what freetype returns.
Anyone any ideas?
Ian
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Devel] helvetica narrow metrics,
Ian Brown <=