IPtoPSNamesImpl.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Michael Plass, October 18, 1990 5:20 pm PDT
Jules Bloomenthal May 31, 1993 2:21 pm PDT
Translate Imager Font Names to PostScript Font Names
DIRECTORY Ascii, Convert, IPtoPS, IO, Rope;
IPtoPSNamesImpl: CEDAR PROGRAM
IMPORTS Convert, IPtoPS, IO, Rope
EXPORTS IPtoPS
~ BEGIN
PSFont: TYPE ~ IPtoPS.PSFont;
ROPE: TYPE ~ Rope.ROPE;
PSFontFromImager: PUBLIC PROC [imagerName: ROPE] RETURNS [psFont: PSFont] ~ {
Break: IO.BreakProc ~ {
RETURN[SELECT char FROM
IN [Ascii.NUL..Ascii.SP], '., ',, ':, ';, '[, '], '(, '), '{, '}, '", '+, '-, '*, '/, '@, '← => sepr,
ENDCASE => other];
};
CheckForInlineScale: PROC ~ {
skipTo: INT ¬ Rope.SkipTo[imagerName,, "0123456789"];
skipOver: INT ¬ Rope.SkipOver[imagerName, skipTo, "0123456789"];
psFont.scale ¬ IF skipTo < Rope.Length[imagerName]
THEN Convert.RealFromRope[Rope.Substr[imagerName, skipTo, skipOver-skipTo]]
ELSE 1.0;
};
out: IO.STREAM ¬ NARROW[Atom.GetProp[$IPtoPSDebug, $Out]];
root: ROPE ¬ NIL;
italicExt: ROPE ¬ "Oblique";
bold, italic: BOOL ¬ FALSE;
s: IO.STREAM ¬ IO.RIS[imagerName];
CheckForInlineScale[];
DO
Find: PROC [key: ROPE] RETURNS [b: BOOL] ~ {b ← Rope.Find[token, key,, FALSE] # -1};
token: ROPE ¬ IO.GetTokenRope[s, Break ! IO.EndOfStream => EXIT].token;
SELECT TRUE FROM
Find["helvetica"],
Find["modern"]  => {psFont.type ¬ $Helvetica; root ¬ "Helvetica"}; -- or Frutiger
Find["symbol"]  => {psFont.type ¬ $Unknown; root ¬ "Symbol"};
Find["math"]   => {psFont.type ¬ $Math; root ¬ "Symbol"};
Find["hippo"]  => {psFont.type ¬ $Greek; root ¬ "Symbol"};
Find["gacha"],
Find["courier"]  => {psFont.type ¬ $Courier; root ¬ "Courier"};
Find["times"],
Find["laurel"],
Find["classic"]  => {psFont.type ¬ $Times; root ¬ "Times-Roman"; italicExt ¬ "Italic"};
ENDCASE => {
IF Find["BRR"] OR Find["BIR"] OR Find["bold"] THEN bold ¬ TRUE;
IF Find["MIR"] OR Find["BIR"] OR Find["italic"] OR Find["oblique"] THEN italic ¬ TRUE;
};
ENDLOOP;
IF root = NIL THEN {
IPtoPS.Warn[Rope.Cat["unknown font: ", imagerName, ", substituting Helvetica"]];
psFont.type ¬ $Helvetica;
root ¬ "Helvetica";
};
IF Rope.Equal[root, "Times-Roman", FALSE] AND (bold OR italic) THEN root ¬ "Times";
psFont.name ¬ SELECT TRUE FROM
bold AND NOT italic => Rope.Concat[root, "-Bold"],
italic AND NOT bold => Rope.Cat[root, "-", italicExt],
bold AND italic => Rope.Cat[root, "-Bold", italicExt],
ENDCASE => root;
};
END.
..
Translation chart, provided by Debra Adams (Adams.parc@Xerox.com):

Font Prefix
 Xerox font File Name
  PostScript Typeface Name    PostScript File Name


xc1-1-1

boldps-printwheel-bold-italic.fd
boldps-printwheel-bold.fd
boldps-printwheel-figuresize-bold-italic.fd
boldps-printwheel-figuresize-bold.fd
boldps-printwheel-figuresize-italic.fd
boldps-printwheel-figuresize.fd
boldps-printwheel-italic.fd
boldps-printwheel.fd
classic-bold-italic.fd
classic-bold.fd
classic-italic.fd
classic.fd
classic-thin-bold.cd
classic-thin.cd
elite-printwheel-bold.fd

  Prestige Elite Bold      ??
elite-printwheel.fd
  Prestige Elite       ??
flemishscriptii.fd
font4.fd
gacha.cd
gates.fd
helvetica-bold-italic.cd

  Helvetica Bold Oblique    helvetica.psf
helvetica-bold.cd
  Helvetica Bold       helvetica-bold.psf
helvetica-italic.cd
  Helvetica Oblique      helvetica-oblique.psf
helvetica.cd
  Helvetica         helvetica.psf
itczapfchancery.fd
  ITC Zapf Chancery Medium Italic zapfchancery-mediumitalic.psf
lettergothic-printwheel-bold.fd
lettergothic-printwheel.fd
logo1.cd
logotypes-xerox.cd
master-printwheel-bold.fd
master-printwheel.fd
modern-bold-italic.fd
modern-bold.fd
modern-italic.fd
modern.fd
ocra-printwheel.fd
ocrb-printwheel.fd
oldenglish.fd
optima-bold-italic.fd

  Optima Bold Oblique      optima-boldoblique.psf
optima-bold.fd
  Optima Bold        optima-bold.psf
optima-italic.fd
  Optima Oblique       optima-oblique.psf
optima.fd
  Optima          optima.psf
pcterminal-bold.fd
pcterminal.fd
pica-printwheel-bold.fd
pica-printwheel.fd
prestige.fd
psbold-printwheel-bold-italic.fd
psbold-printwheel-bold.fd
psbold-printwheel-figuresize-bold-italic.fd
psbold-printwheel-figuresize-bold.fd
psbold-printwheel-figuresize-italic.fd
psbold-printwheel-figuresize.fd
psbold-printwheel-italic.fd
psbold-printwheel.fd
scientific-printwheel-bold.fd
scientific-printwheel.fd
scientific-thin-printwheel-bold.fd
scientific-thin-printwheel.fd
spokesman-printwheel-bold.fd
spokesman-printwheel.fd
template.fd
terminal-bold.cd
terminal.cd
titan-printwheel-bold-italic.fd
titan-printwheel-bold.fd
titan-printwheel-italic.fd
titan-printwheel.fd
trend-printwheel-bold.fd
trend-printwheel-figuresize-bold.fd
trend-printwheel-figuresize.fd
trend-printwheel.fd
trendps-printwheel-bold.fd
trendps-printwheel-figuresize-bold.fd
trendps-printwheel-figuresize.fd
trendps-printwheel.fd
troffclassic-bold.fd
troffclassic-italic.fd
troffclassic.fd
troffmath.fd
troffmathextra.fd
trojan-printwheel-bold.fd
trojan-printwheel.fd
vintage-printwheel-bold.fd
vintage-printwheel.fd

cg-cscourier-bold-oblique-ps.fis

  Courier Bold Oblique     courier-boldoblique.psf
cg-cscourier-bold-ps.fis
  Courier Bold        courier-bold.psf
cg-cscourier-medium-ps.fis
  Courier          courier.psf
cg-cscourier-oblique-ps.fis
  Courier Oblique       courier-oblique.psf
cg-cstimes-bold-italic-ps.fis
  Times Bold Italic      times-bolditalic.psf
cg-cstimes-bold-ps.fis
  Times Bold         times-bold.psf
cg-cstimes-italic-ps.fis
  Times Italic        times-italic.psf
cg-cstimes-roman-ps.fis
  Times Roman        times-roman.psf
cg-cstriumvirate-bold-italic-ps.fis
  Helvetica Bold Oblique    helvetica-bold-oblique.psf
cg-cstriumvirate-bold-ps.fis
  Helvetica Bold       helvetica-bold.psf
cg-cstriumvirate-condensed-bold-italic-ps.fis
cg-cstriumvirate-condensed-bold-ps.fis
cg-cstriumvirate-condensed-italic-ps.fis
cg-cstriumvirate-condensed-regular-ps.fis
cg-cstriumvirate-italic-ps.fis

  Helvetica Oblique      helvetica-oblique.psf
cg-cstriumvirate-regular-ps.fis
  Helvetica         helvetica.psf
urw-itcsouvenir-demi-italic-ps.fis
  ITC Souvenir Demi Italic
urw-itcsouvenir-demi-ps.fis
  ITC Souvenir Demi
urw-itcsouvenir-light-italic-ps.fis
  ITC Souvenir Light Italic
urw-itcsouvenir-light-ps.fis
  ITC Souvenir Light

xc1-2-2
classic-bold.fis
classic-italic.fis
classic.fis
helvetica-bold-italic.fis

  Helvetica Bold Oblique    helvetica-bold-oblique.psf
helvetica-italic.fis
  Helvetica Oblique      helvetica-oblique.psf
helvetica.fis
  Helvetica         helvetica.psf
logotypes-xerox.fis
modern-bold-italic.fis
modern-bold.fis
modern-italic.fis
modern.fis
optima-bold-italic.fis

  Optima Bold Oblique      optima-boldoblique.psf
optima-bold.fis
  Optima Bold        optima-bold.psf
optima-italic.fis
  Optima Oblique       optima-oblique.psf
optima.fis
  Optima          optima.psf
timesroman-bold-italic.fis
  Times Bold Italic      times-bolditalic.psf
timesroman-bold.fis
  Times Bold         times-bold.psf
timesroman-italic.fis
  Times Italic        times-italic.psf
timesroman.fis
  Times Roman        times-roman.psf

cg-cscenturyschoolbook-bold-italic-ps.fis
cg-cscenturyschoolbook-bold-ps.fis
cg-cscenturyschoolbook-italic-ps.fis
cg-cscenturyschoolbook-regular-ps.fis
cg-cslettergothic-bold-oblique-ps.fis

  Letter Gothic Bold Slanted
cg-cslettergothic-bold-ps.fis
  Letter Gothic Bold
cg-cslettergothic-medium-oblique-ps.fis
  Letter Gothic Slanted
cg-cslettergothic-medium-ps.fis
  Letter Gothic
cg-csomega-bold-italic-ps.fis
  Optima Bold Oblique      optima-boldoblique.psf
cg-csomega-bold-ps.fis
  Optima Bold        optima-bold.psf
cg-csomega-italic-ps.fis
  Optima Oblique       optima-oblique.psf
cg-csomega-regular-ps.fis
  Optima          optima.psf
cg-cspalacio-bold-italic-ps.fis
  Palatino Bold Italic     palatino-bolditalic.psf
cg-cspalacio-bold-ps.fis
  Palatino Bold        palatino-bold.psf
cg-cspalacio-italic-ps.fis
  Palatino Italic       palatino-italic.psf
cg-cspalacio-roman-ps.fis
  Palatino         palatino-roman.psf
cg-cssymbol-ps.fis
  Symbol          symbol.psf
lt-univers-55.fis
  Univers 55
lt-univers-56.fis
  Univers Oblique
lt-univers-65.fis
  Univers 65
lt-univers-66.fis
  Univers Bold Oblique
mt-monotypebodoni-bold-italic.fis
  Bodoni Bold Italic
mt-monotypebodoni-bold.fis
  Bodoni Bold
mt-monotypebodoni-italic.fis
  Bodoni Italic
mt-monotypebodoni.fis
  Bodoni
mt-rockwell-bold-italic.fis
mt-rockwell-bold.fis
mt-rockwell-italic.fis
mt-rockwell.fis
urw-itcavantgardegothic-book-oblique-ps.fis

  ITC Avant Garde Gothic Book Oblique  avantgarde-bookoblique.psf
urw-itcavantgardegothic-book-ps.fis
  ITC Avant Garde Gothic Book     avantgarde-book.psf
urw-itcavantgardegothic-demi-oblique-ps.fis
  ITC Avant Garde Gothic Demi Oblique  avantgarde-demioblique.psf
urw-itcavantgardegothic-demi-ps.fis
  ITC Avant Garde Gothic Demi     avantgarde-demi.psf
urw-itcbookman-demi-italic-ps.fis
  ITC Bookman Demi Italic      bookman-demiitalic.psf
urw-itcbookman-demi-ps.fis
  ITC Bookman Demi         bookman-demi.psf
urw-itcbookman-light-italic-ps.fis
  ITC Bookman Light Italic      bookman-lightitalic.psf
urw-itcbookman-light-ps.fis
  ITC Bookman Light        bookman-light.psf

urw-itcgaramond-bold-italic-ps.fis See ** below
urw-itcgaramond-bold-ps.fis   See ** below
urw-itcgaramond-book-italic.fis  See ** below
urw-itcgaramond-book.fis    See ** below
urw-itcgaramond-light-italic-ps.fis See ** below
urw-itcgaramond-light-ps.fis   See ** below

** There are four different Garamond typefaces produced by Adobe.
  I am not sure which Garamond is the correct correlate to the
fonts that we have. Here are the names:

ITC Garamond Light
  garamond-light.psf      ?
ITC Garamond Light Italic
  garamond-lightitalic.psf    ?
ITC Garamond Bold
  garamond-bold.psf      ?
ITC Garamond Bold Italic
  garamond-bolditalic.psf    ?

Garamond 3
  garamond-light.psf      ?
Garamond 3 Italic
  garamond-lightitalic.psf    ?
Garamond 3 Bold
  garamond-bold.psf      ?
Garamond 3 Bold Italic
  garamond-bolditalic.psf    ?

Stempel
  Garamond Roman
Stempel
  Garamond Italic
Stempel
  Garamond Bold
Stempel
  Garamond Bold Italic

Adobe
  Garamond Regular
Adobe
  Garamond Italic
Adobe
  Garamond Bold
Adobe
  Garamond Bold Italic

urw-itclubalingraph-book-ps.fis
    ITC Lubalin Graph Book    lubalingraph-book.psf
urw-itclubalingraph-demi-ps.fis
    ITC Lubalin Graph Demi    lubalingraph-demi.psf
urw-itcnewbaskerville-bold-italic.fis
    ITC New Baskerville Bold Italic newbaskerville-bolditalic.psf
urw-itcnewbaskerville-bold.fis  
    ITC New Baskerville Bold    newbaskerville-bold.psf
urw-itcnewbaskerville-italic.fis
    ITC New Baskerville Italic   newbaskerville-italic.psf
urw-itcnewbaskerville-roman.fis
    ITC New Baskerville      newbaskerville-roman.psf
urw-itczapfchancery-medium-italic-ps.fis
    ITC Zapf Chancery Medium Italic zapfchancery-mediumitalic.psf
urw-itczapfdingbats-ps.fis
    ITC Zapf Dingbats      zapfdingbats.psf

xc1-3-3
classic-bold-italic.fis
classic-bold-italic.icfk
classic-bold.fis
classic-bold.icfk
classic-italic.fis
classic-italic.icfk
classic.fd
helvetica-bold-italic.fd

  Helvetica
Bold Oblique       helvetica.psf
helvetica-bold.fd
  Helvetica Bold         helvetica-bold.psf
helvetica-italic.fd
  Helvetica Oblique        helvetica-oblique.psf
helvetica.fd
  Helvetica           helvetica.psf
modern-bold-italic.fis
modern-bold-italic.icfk
modern-bold.fis
modern-bold.icfk
modern-italic.fis
modern-italic.icfk
modern.fd
optima-bold-italic.fd

  Optima Bold Oblique        optima-boldoblique.psf
optima-bold.fd
  Optima Bold          optima-bold.psf
optima-italic.fd
  Optima Oblique         optima-oblique.psf
optima.fd
  Optima            optima.psf
quartz-bold-italic.fd
quartz-bold.fd
quartz-italic.fd
quartz.fd
times-bold-italic.
fd
  Times Bold Italic        times-bolditalic.psf
times-bold.fd
  Times Bold           times-bold.psf
times-italic.fd
  Times Italic          times-italic.psf
times.fd
  Times Roman          times-roman.psf
univers-bold-italic.fd
  Univers Bold Oblique
univers-bold.fd
  Univers Bold 65
univers-italic.fd
  Univers Oblique
univers.fd
  Univers 55