Re: embed fonts in eps from R?
On 10/9/06, Yury Yuryev <email@example.com> wrote:
Here was a discussion about software used to make a graphs
for publications. Among others the R statistical software was
mentioned. I spent some time to learn it and found a problem when
tried to submit an eps graphs created with R.
The publisher (AIP) demands submission of separate eps file
for each figure with all fonts embedded in it (even the standard
14 adobe fonts).
As I understand the R does not do this embedding. It inserts only
comments what resources are needed.
There was a discussion on the R Help list:
Salients points were:
1) some publishers do accept EPS files that refer to the Adobe base 13
fonts via DS comments of the form:
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%+ font Times-BoldItalic
%%+ font Symbol
This needs some care, as the majority of systems will substitute free
fonts such as the URW versions for the real Adobe fonts.
Unfortunately, there are some differences that
can be significant -- compare, e.g., Helvetica-Oblique with Arial-Italic.
Ghostscript now provides a ps2ps2 script that supports the Adobe
distiller parameters, so
you should be able to configure it to embed the fonts, but the result
is plain (level 2) PS and not EPS and does not have DSC. This is
similar to what you would get by converting to PDF and back to PS.
2) some proprietary programs (Corel Draw) do provide an option to
embed fonts in EPS files.
Is there a solution for problem within open
source environment (without using of proprietary software)?
My approach is to convert fonts to outline paths, in part because in
the good old days many typesetters used 3rd party rasterizers that
could not reliably render all Type 1 fonts, in particular, the Y&Y/BSR
versions of Computer Modern. This does mean you loose the benefits of
font hinting, which affects low-res devices (<400dpi, e.g.,screen
viewing), but does not matter at photo-typesetter resolutions (>1000
dpi). This can be done using the
pstoedit tool with "-f ps2ai -dt ..."
Try this on a trivial file: .../texmf/doc/latex/graphics/a.ps and open
the eps file in an editor. You should see a bunch of lines ending in
"c", defined in the prologue as "rcurveto", used to draw the outline
of the letter.
The ps2edit utility can also be used to do this. If you use the ps2ai
driver you can load the results in sketch/skencil see the outline
paths. I sometimes use this to create annotations for figures.
The second picture format that AIP journals accept is TIFF, but
R has no tiff device to produce that pictures. Is there a strait way
to convert the EPS file into the high resolution high quality TIFF figure?
The problem with TIFF has been the non-free status of the LZW
I think the patent has lapsed in some jursidictions, so perhaps
effective compression is available in current tools such as Image
Sorry if this is off-top questions.
Not at all, as the problem involves using tools available to debian
users to do things that are commonly done using commercial tools.
George N. White III <firstname.lastname@example.org>
Head of St. Margarets Bay, Nova Scotia