Font Manager vs Postscript
Scott E. Townsend
fsset at bach.lerc.nasa.gov
Tue Mar 26 01:13:14 AEST 1991
I'm having some problems getting the fonts returned by the font manager to
agree with what I'm getting with Postscript and would appreciate any
suggestions the net may have.
My program (something like Showcase from what I've heard here) works fine
with the font manager via code like this:
fh = fmfindfont(font_names[current_font]);
p_text->font_handle = fmscalefont(fh, current_size);
I don't get just any font size I may request, the font manager picks the
'closest' in the font directory (both according to my reading of the
manual and by observation) This is workable, but inconvenient. According to
the manual, I can force the font manager to create (degraded IMHO) fonts of
my requested size via fmrotatepagematrix(). By experimentation the rotation
angle must be >= 0.001 for this to work.
I have three questions:
1. Is there some other way to get better-looking fonts of my requested size?
2. Is there a way to determine all the 'natural' sizes for a font?
I've tried fmenumerate(), but I get only one entry for 'Helvetica' which
appears to have multiple natural sizes:
callback: 'Helvetica'
printermatched = 0
matrix = 5.000000, 0.000000, 0.000000, 5.000000
type = 0
encoding = 0
fixed_width = 0
xorig = 1
yorig = 2
xsize = 9
ysize = 11 <<-- I know there's more than just this height
height = 11
nglyphs = 312
bitsdeep = 1
width = 8
resolution = 72
weight = 0
3. Given a font manager font fh, what is the correct scaling to apply to get
a matching Postscript font? By 'matching' I mean same size proportionally
to the size of the screen. I have my graphics sized OK, but the fonts
are not. Is it as simple as fh->height or fh->ysize? What about the
screen resolution vs typographic points? (Note: this is for Postscript
printer output, not any NeWS stuff)
If this is a matter of RTFM, please suggest specific sections. I've read
the font manager stuff, but maybe you can say which parts to re-read.
--
------------------------------------------------------------------------
Scott Townsend | Phone: 216-433-8101
NASA Lewis Research Center | Mail Stop: 5-11
Cleveland, Ohio 44135 | Email: fsset at bach.lerc.nasa.gov
------------------------------------------------------------------------
More information about the Comp.sys.sgi
mailing list