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

Re: fontname postfixes



Timothy Murphy <tim@maths.tcd.ie> writes:

>> ... can you not write (or at least allow) psfonts.map in standard key=value format
>> ... At present it is unintelligible except to a handful of cognoscenti.

Here is the grammar I've implemented in my DVI drivers to define the
psfonts.map format (I didn't design the format, and had I done so, it
would not have looked like it does), taken from the comment header in
the C source file that parses it; perhaps it will make psfonts.map
more intelligible:

>> ...
>> Tokens in the PSMAPFILE file are separated by whitespace, and take the
>> form of one of these regular-expressions (to be matched in this
>> order):
>> 
>> (1) Comment:
>> 		[%#*]<any-char>*$
>> 		^[ \t]*$
>> 
>> (2) PostScript header file name (zero, one, or two times):
>> 		<left-angle-bracket><non-blank-char>+
>> 
>> (3) PostScript literal text:
>> 		<quotation-mark><non-quotation-mark>*<quotation-mark>
>> 
>> (4) Font name:
>> 		<non-blank-char>+
>> 
>> For (3), the surrounding quotation marks are excluded from the
>> returned token.
>> 
>> A backslash is an escape character that causes the following character
>> to be interpreted specially; the escape mechanism matches that of
>> Standard C:
>> 
>> 	\\		backslash
>> 	\a		alarm (bell)
>> 	\b		backspace
>> 	\f		formfeed
>> 	\n		newline
>> 	\o \oo \ooo	(o matches [0-7]) octal character value
>> 	\r		carriage return
>> 	\t		horizontal tab
>> 	\v		vertical tab
>> 	\xhhhh...	(h matches [0-9a-fA-F]) hexadecimal character value
>> 	\<other>	<other>
>> 
>> Each line is expected to contain
>> 
>> TeX-font-name opt-PS-font-name <opt-PS-encoding-file-name <opt-PS-file-name "opt-PS-text"
>> 
>> The order of the tokens is arbitrary, and those marked by opt- are
>> optional.
>> 
>> After discarding comments, the first token which is not
>> PS-encoding-file-name, PS-file-name or PS-text is TeX-font-name.  If
>> no PS-font-name is supplied, it is the same as the TeX-font-name.
>> 
>> Here are some sample entries:
>> 
>> Times-Roman
>> rptmr	   	Times-Roman
>> rptmrre 		Times-Expanded "/Times-Roman 1.2 ExtendFont"
>> rpadr   		AGaramond-Regular <AGaramond-Regular.pfb
>> rpopro		Optima-Oblique <Optima.pfb "/Optima .1944 SlantFont"
>> pbbro8r		MBembo " .167 SlantFont TeXBase1Encoding ReEncodeFont " <8r.enc <pbbr8a.pfb
>> pgsl8r		GillSans-Light "TeXBase1Encoding ReEncodeFont " <8r.enc <pgsl8a.pfb
>> ...

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah                    Internet e-mail: beebe@math.utah.edu  -
- Department of Mathematics, 322 INSCC                   beebe@acm.org        -
- 155 S 1400 E RM 233                                    beebe@ieee.org       -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  - 
-------------------------------------------------------------------------------