FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-15-2008, 02:05 PM
Steve Kleene
 
Default rendering Postscript fonts

I could use some remedial instruction on how Postscript fonts are rendered.
I am submitting a grant proposal to Grants.gov, and the only serifed fonts
they allow are Palatino-Linotype and Georgia. Neither of these is supported
by the typesetter I use, groff 1.18. It does support Palatino, but not
Palatino-Linotype, strictly speaking. By changing the "internalname" in
/usr/share/groff/1.18.1/font/devps/PR (and PB, PI, PBI), I can get the PS
file to list "Palatino-Linotype" everywhere instead of "Palatino". This may
be necessary if they have a really stupid bot checking for font compliance.

Groff makes the PS, and then I use gs to make a PDF. What I believe is that
people reading this document (likely on Windows) will call up their local
font definitions when they view this. These definitions are used to draw the
characters, but the spacing is all defined by the PDF. Is that correct?

I'm less sure how a font is selected for rendering. On Debian, for example,
I use gv to look at the PS file. It presumably uses files in
/usr/share/fonts/type1/gsfonts, but none of these show a FontName that is
Palatino. I can't find where the rule is specified that tells what gsfont to
use for a PS file that lists Palatino.

On XP, the PS displays correctly in Acrobat even if the PS asks for
"Palatino" instead of "Palatino-Linotype". Supposedly I only have the second
of those on XP, so it must silently subtitute "Palatino-Linotype" for
"Palatino".

As another test, I typeset a paragraph in XP and then again with groff, each
using its Palatino at 11 point. The line breaks were not all at the same
places, showing that the XP and groff implementations are different. Again,
I suspect that the characters may be drawn identically but that the spacing
may differ. Spacing, I hope, is fixed in the PDF, assuring that a reviewer
will see the layout I intend.

Finally, I tried integrating an XP TrueType font (pala.ttf) into groff as
described at:

http://www.sfr-fresh.com/unix/misc/groff-1.19.2.tar.gz:a/groff-1.19.2/contrib/mom/momdoc/appendices.html#FONTS

This got too messy because of definition conflicts (e.g. sfthyphen instead of
hyphen).

Thanks.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-17-2008, 09:07 PM
Florian Kulzer
 
Default rendering Postscript fonts

On Sun, Jun 15, 2008 at 10:05:59 -0400, Steve Kleene wrote:
> I could use some remedial instruction on how Postscript fonts are rendered.
> I am submitting a grant proposal to Grants.gov, and the only serifed fonts
> they allow are Palatino-Linotype and Georgia. Neither of these is supported
> by the typesetter I use, groff 1.18. It does support Palatino, but not
> Palatino-Linotype, strictly speaking. By changing the "internalname" in
> /usr/share/groff/1.18.1/font/devps/PR (and PB, PI, PBI), I can get the PS
> file to list "Palatino-Linotype" everywhere instead of "Palatino". This may
> be necessary if they have a really stupid bot checking for font compliance.
>
> Groff makes the PS, and then I use gs to make a PDF. What I believe is that
> people reading this document (likely on Windows) will call up their local
> font definitions when they view this. These definitions are used to draw the
> characters, but the spacing is all defined by the PDF. Is that correct?

That depends on whether the fonts are embedded in the PDF. You can use
the pdffonts command (package poppler-utils or xpdf-utils) to check the
PDF that you produce. I would try to make sure that your PDF has all
fonts embedded, otherwise the kerning (the inter-character spacing) may
be wrong if another font is substituted. This can mean that your file
will be rejected if there is some form of visual inspection and it will
almost certainly annoy the referees.

If your trick with groff results in embedded fonts that are named just
like the grants.gov requires it then you should be safe (unless these
fonts look very different from the real ones). I would check this with
the Adobe reader just to be sure; see File > Properties > Fonts. (Kpdf
and evince have the same menus to display the font information but I
guess it is most likely that the agency will check with Adobe tools if
they check at all.)

> I'm less sure how a font is selected for rendering. On Debian, for example,
> I use gv to look at the PS file. It presumably uses files in
> /usr/share/fonts/type1/gsfonts, but none of these show a FontName that is
> Palatino. I can't find where the rule is specified that tells what gsfont to
> use for a PS file that lists Palatino.

Fonts can be embedded in the PS file, too, so maybe there is no font
substitution going on. You can search for "%%DocumentFonts:",
"%%DocumentSuppliedResources:", "%%+ font" and "%%BeginResource: font"
directives in the postscript code.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-18-2008, 12:42 AM
Steve Kleene
 
Default rendering Postscript fonts

On Sun, 15 Jun 2008 10:05:59 -0400, I wrote:

> Groff makes the PS, and then I use gs to make a PDF. What I believe is that
> people reading this document (likely on Windows) will call up their local
> font definitions when they view this. These definitions are used to draw the
> characters, but the spacing is all defined by the PDF. Is that correct?

On Tue, 17 Jun 2008 23:07:16 +0200, Florian Kulzer replied:

> That depends on whether the fonts are embedded in the PDF. ...

The results of the tests you suggested were interesting. Looking first at
the PS made with groff, I found no fonts shown as
"%%DocumentSuppliedResources:", except for one that was in the figures. This
must have been embedded by Illustrator, which I used to create the figures.
There were no instances of "%%DocumentFonts:", and only the font in the
figures showed as "%%BeginResource: font". The main text fonts (the four
Palatino fonts) were shown as "%%IncludeResource:".

Then I made the PDFs with gs. Adding "-dEmbedAllFonts=true" didn't affect
the results, as I gather it is the default. In Acrobat, the four Palatino
fonts showed as "Embedded Subset". The Symbol font, which I did use, was
not shown as embedded for some reason. pdffonts gave the same results.

For fun, I then changed the "internalname" line in
/usr/share/groff/1.18.1/font/devps/PR from "PalatinoLinotype-Roman" to
"Zalatino" and remade the PS and PDF. The text was no longer justified in
either the PS (viewed with gv) or the PDF (viewed with Acrobat whether XP or
Debian). I suspect that the intercharacter spacing is correct but a
different font was substituted. I had guessed that if the font were
embedded, it wouldn't matter what name was assigned. But apparently I
guessed wrong.

Since Grants.gov accepts PalatinoLinotype, and since it's on all XP setups,
I should be fine. The documents viewed with Acrobat look OK. But I
wouldn't say I understand all of this just yet.

Thanks.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 07:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org