[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: raw font encodings




    One outstanding problem is that the Virtual Fonts which are shipped as
    part of the package don't support glyphs like <eth> and <aacute> very
    well, because they assume that the raw fonts are in Adobe Standard
    encoding. 

    We'd like to change this, which means that the raw fonts have to be
    re-encoded with a new PostScript encoding vector.  The question is,
    what vector to use.

I made this proposal a while ago, and it was grossly misunderstood.  
It is specifically for a raw font encoding, set up to ensure that
all simplex characters are at least available for the output font
encoding, which I treat as variable.  Doesn't mean that you have
to treat it as variable, only that you can.  

The only virtue that I claim for this is that it ensures that
you can get at all the simplex characters if you want to.

In the case of really huge Superfonts, like IBM Courier,
there are more simplex characters than can be held in a 255-character
encoding vector.  ( The blue book, p 199 suggests that 0--255
is a genuine limitation.)  The only answer there is to extract
the obvious pi characters into a different raw-font encoding.  
I explain below why I do not include composites (except for
the characters that might be thought composites in the expert font,
but are actually simplex).

I have used this scheme for a year, with no ill effects at all.

%
%   This is ASEX encoding. (file ASEX.enc)
%
%   Adobe Standard Encoding Extended.
%
%   Creator: Pierre A. MacKay mackay@cs.washington.edu
%   Creation Date: Thu Aug 31 08:56:22 PDT 1993
%
%   This is an input coding file for creation of a "raw font".
%   It can, for esample be used  with Radical Eye Software's
%   afm2tfm.  Use with the -p flag.  This same encoding can also be
%   used with ps2pk to create a complete set of bitmapped 
%   simplex characters.
%
%   The {\em sole} purpose of this file is to ensure that all {\em simplex}
%   characters in the font are made available in the raw TFM.  Therefore
%   there are no ligatures or any other refinements.  The raw TFM
%   file contains no ligatures or kernings---nothing but character 
%   metrics.  We retain Adobe Standard encoding for all mapped 
%   characters in the AFM file, and extend the list by adding
%   the unmapped simple characters into the empty code positions
%   from O 200 to O 240.  It is assumed that the output coding used
%   for the TeX tfm will be different from this ( -t flag in afm2tfm ).
%
%   The extended part of this  encoding is consistent with the general 
%   run of text fonts from Adobe, BitStream, DTC, Linotype, Monotype, 
%   URW and probably others as well.  For SuperFont characters, see below.
%   In a library of over 300 text fonts, I have found no variants.  The only
%   variant in display fonts is the occasional absence of lowercase.
%
%   Jan Michael Rynnings has pointed out that a few very carefully designed
%   fonts, e. g. Adobe Garamond and Adobe Caslon, may treat all the accented
%   characters as simplex glyphs (must make for a large pfa file), and that
%   this input encoding would not recognize such refinements.  True---but
%   such fonts will be a tiny minority, and can be dealt with by
%   special encoding files.  A couple of tests indicate that it makes
%   no perceptible difference whether you use composites formed from
%   the CC recipes in the AFM file or call the characters out directly
%   from the PFA file.  There seems no reason, therefore, to fill the
%   raw font with characters that are clearly identified as composites
%   in the AFM file.  
%
%   Usage:
%     afm2tfm <FontName>.afm -p ASEX.enc -t <XXX>.enc -v <vplname> <rawname>
%
/ASEXEncoding [          % now 256 chars follow
%
% The following will replace the characters from 0 to 32 in the raw encoding
% if you have access to a SuperFont.  There is reason to hope that this
% set will be as stable as the unmapped set in current text fonts
% If you don't have a SuperFont, and have to create any of these as a 
% composite, precede the name with a dot, as is done here for 
% Scedilla and scedilla.  The change in name  keeps afm2tfm from thinking
% that the character already exists when it comes to evaluate the output
% (-t flag) encoding.
%
% 0x00 
  /Aogonek /Eogonek /Iogonek /Kafii9170 /Lafii9170 /Lcaron /Nafii9170 /Rafii9170 
  /Safii9170 /.Scedilla /Tafii9170 /Uogonek /.notdef /.notdef /.notdef /.notdef 
% 0x10
  /aogonek /eogonek /iogonek /kafii9170 /lafii9170 /lcaron /nafii9170 /rafii9170 
  /safii9170 /.scedilla /tafii9170 /uogonek /.notdef /.notdef /.notdef /.notdef 
% 0x20 % Keep the space, for use as \boundarychar (Give it zero width in vpl)
  /space /exclam /quotedbl /numbersign
  /dollar /percent /ampersand /quoteright
  /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
% 0x30
  /zero /one /two /three /four /five /six /seven
  /eight /nine /colon /semicolon /less /equal /greater /question
% 0x40
  /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O 
% 0x50
  /P /Q /R /S /T /U /V /W
  /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
% 0x60
  /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o
% 0x70
  /p /q /r /s /t /u /v /w
  /x /y /z /braceleft /bar /braceright /asciitilde /.notdef
%
% This is the Extension to Adobe Standard Encoding
%
% In as many of the next 32 positions as necessary, include
% all the unmapped simple (non-composite) characters.  The
% inclusion of Ccedilla and ccedilla is problematic.  These are
% composites in some schemes, simple in others.  Best to 
% assume they are simplex.  Characters are entered in alphabetical order
% by name. If you need to create your own composite for Ccedilla
% ccedilla or Eth, precede the name with a dot as indicated above.
%
% 0x80
  /Ccedilla /Eth /Thorn /brokenbar /ccedilla /copyright /degree /divide
  /eth /logicalnot /minus /mu /multiply /onehalf /onequarter /onesuperior
% 0x90 
  /plusminus /registered /thorn /threequarters
  /threesuperior /trademark /twosuperior /.notdef 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
%
% From here on the order is again Adobe Standard Encoding
%
% 0xA0
  /.notdef /exclamdown /cent /sterling /fraction /yen /florin /section 
  /currency /quotesingle /quotedblleft /guillemotleft
  /guilsinglleft /guilsinglright /fi /fl
% 0xB0
  /.notdef /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet 
  /quotesinglbase /quotedblbase /quotedblright /guillemotright
  /ellipsis /perthousand /.notdef /questiondown 
% 0xC0 
  /.notdef /grave /acute /circumflex /tilde /macron /breve /dotaccent
  /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
% 0xD0
  /emdash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
% 0xE0
  /.notdef /AE /.notdef /ordfeminine /.notdef /.notdef /.notdef /.notdef 
  /Lslash /Oslash /OE /ordmasculine /.notdef /.notdef /.notdef /.notdef 
% 0xF0 
  /.notdef /ae /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef 
  /lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
] def

Same rationale for "Expert Font" encoding

%
%   THis file is ASEXP.enc
%
%   This is ASEXP encoding, for the Monotype Expert character set.
%   In Baskerville, only the Roman Regular has all the characters.
%   It appears to be the same as what Adobe uses---who knows?
%
/ASEXPEncoding [          % now 256 chars follow
% 0x00 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
% 0x10
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
% 0x20 % The independent accent slash doesn't exist
  /.notdef /exclamsmall /Hungarumlautsmall /.notdef
  /dollaroldstyle /dollarsuperior /ampersandsmall /Acutesmall
  /parenleftsuperior /parenrightsuperior /twodotenleader /onedotenleader
  /comma /hyphen /period /fraction
% 0x30
  /zerooldstyle /oneoldstyle /twooldstyle /threeoldstyle
  /fouroldstyle /fiveoldstyle /sixoldstyle /sevenoldstyle 
  /eightoldstyle /nineoldstyle /colon /semicolon 
  /commasuperior /threequartersemdash /periodsuperior /questionsmall
% 0x40
  /.notdef /asuperior /bsuperior /centsuperior 
  /dsuperior /esuperior /.notdef /.notdef 
  /.notdef /isuperior /.notdef /.notdef
  /lsuperior /msuperior /nsuperior /osuperior
% 0x50
  /.notdef /.notdef /rsuperior /ssuperior 
  /tsuperior /.notdef /ff /fi
  /fl /ffi /ffl /parenleftinferior 
  /.notdef /parenrightinferior /Circumflexsmall /hyphensuperior
% 0x60
  /Gravesmall /Asmall /Bsmall /Csmall /Dsmall /Esmall /Fsmall /Gsmall 
  /Hsmall /Ismall /Jsmall /Ksmall /Lsmall /Msmall /Nsmall /Osmall
% 0X70
  /Psmall /Qsmall /Rsmall /Ssmall /Tsmall /Usmall /Vsmall /Wsmall
  /Xsmall /Ysmall /Zsmall /colonmonetary 
  /onefitted /rupiah /Tildesmall /.notdef
% 0x80
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
% 0x90
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
% 0xA0
  /.notdef /exclamdownsmall /centoldstyle /Lslashsmall
  /.notdef /.notdef /Scaronsmall /Zcaronsmall
  /Dieresissmall /Brevesmall /Caronsmall /.notdef
  /Dotaccentsmall /.notdef /.notdef /Macronsmall
% 0xB0
  /.notdef /.notdef /figuredash /hypheninferior
  /.notdef /.notdef /Ogoneksmall /Ringsmall
  /Cedillasmall /.notdef /.notdef /.notdef
  /onequarter /onehalf /threequarters /questiondownsmall 
% 0xC0
  /oneeighth /threeeighths /fiveeighths /seveneighths 
  /onethird /twothirds /.notdef /.notdef 
  /zerosuperior /onesuperior /twosuperior /threesuperior 
  /foursuperior /fivesuperior /sixsuperior /sevensuperior 
% 0xD0
  /eightsuperior /ninesuperior /zeroinferior /oneinferior 
  /twoinferior /threeinferior /fourinferior /fiveinferior 
  /sixinferior /seveninferior /eightinferior /nineinferior 
  /centinferior /dollarinferior /periodinferior /commainferior 
% 0xE0 
  /Agravesmall /Aacutesmall /Acircumflexsmall /Atildesmall
  /Adieresissmall /Aringsmall /AEsmall /Ccedillasmall 
  /Egravesmall /Eacutesmall /Ecircumflexsmall /Edieresissmall
  /Igravesmall /Iacutesmall /Icircumflexsmall /Idieresissmall 
% 0xF0
  /Ethsmall /Ntildesmall /Ogravesmall /Oacutesmall 
  /Ocircumflexsmall /Otildesmall /Odieresissmall /OEsmall 
  /Oslashsmall /Ugravesmall /Uacutesmall /Ucircumflexsmall
  /Udieresissmall /Yacutesmall /Thornsmall /Ydieresissmall 
] def

Email concerned with UnixTeX distribution software should be sent primarily
to:	UnixTeX@u.washington.edu	        Elizabeth Tachikawa
otherwise to:  mackay@cs.washington.edu		Pierre A. MacKay
Smail:  Northwest Computing Support Center	Resident Druid for
	Thomson Hall, Mail Stop DR-10		Unix-flavored TeX
	University of Washington
	Seattle, WA 98195
	(206) 543-6259