Re: making fonts look same in Ghostscript and X11
- From: Helge Blischke <h.blischke@xxxxxx>
- Date: Sat, 17 Jun 2006 18:15:54 +0200
Usman Muzaffar wrote:
My application writes text to X11 display and to PostScript output. I
want the rendered output by Ghostscript on that same X11 display to
look *exactly* (identical pixels) like it does in my X11 app.
But even if I use exactly the same Type 1 font (Times Roman 18,
which on my system maps "Nimbus Roman No 9 L" from URW) for
both X11 and PostScript output, there are noticeable differences,
especially in the spaces between letters and words, but even in
the rendering for individual glyphs.
It's easy to illustrate the discrepancy (this is on Fedora Core 3,
Xorg 6.8.1.902, GNU Ghostscript 7.07, 100dpi display). Compare:
% cat hello.ps
/Times-Roman findfont 18 scalefont setfont
10 10 moveto (The quick brown fox jumps over the lazy dog.) show
% gs -g800x50 -sDEVICE=x11 hello.ps
TO
% xmessage -fn
'-urw-nimbus roman no9 l-medium-r-normal--18-0-0-0-p-0-iso8859-1'
"The quick brown fox jumps over the lazy dog."
On my system, they're not even close. Larger fonts match a bit better,
but it's never anywhere near identical.
Questions:
1. Is this to be expected? The same Type 1 font will be rendered with
significant differences by X vs GhostScript? Why? Does the font data
leave a lot of specifics up to the individual rendering engine?
2. What are my choices for making Ghostscript and X11 match perfectly
(or as best as possible)? I'm not wedded to Type 1 fonts or even
X11 - my app just needs to manipulate text on a display, and then create
PostScript that when rendered on that display looks the way it did in
my app. Suggestions (short of embeeding Ghostcript in my app)?
Thanks,
-usman
As Aandi stated, there is no guarantee that both rendering engines will
display the same glyphs exactly the same.
But, as for the document layout, what seems to be essential to your
workflow, you should either
- use the font's printer metrics (as specified in the accompanying AFM
file for Type1 fonts) in your display application,
or
- use the X11 metrics for your PostScript output.
Both approaches require some (not neglectable) amount of additional
work, but I think the only means to settle your issue.
Helge
--
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
.
- References:
- making fonts look same in Ghostscript and X11
- From: Usman Muzaffar
- making fonts look same in Ghostscript and X11
- Prev by Date: Re: making fonts look same in Ghostscript and X11
- Next by Date: June 2006 Acumen Journal now available. This month: Explicitly Masked Images, Part 1
- Previous by thread: Re: making fonts look same in Ghostscript and X11
- Next by thread: Re: making fonts look same in Ghostscript and X11
- Index(es):
Relevant Pages
|