[comp.lang.postscript] Accessing special character fonts

george@sgi.com (07/20/90)

I am trying to print out the udieresis character( an 'u' with two dots over it)
and I am not having much success.  Has anyone done it or knows how
to access that character.  I have the Adobe's standard text fonts and
the Symbol font, and I can't get to that character by using a new
Encoding vector. Thanx.

-george

maguire@cs.columbia.edu (Gerald Q. Maguire) (07/21/90)

Here is a sample program which prints the character you want (in fact
it prints all the character is the HP Roman 8 bit set).

%!
% this file contains the definitions for HP Roman8 character encodings
% in Postscript
%
% written 88.12.29 G.Q. Maguire Jr.
% (C) 1988 Maguire
% All rights reserved
%

% sample usage:
%    /Times-Roman /Times-Roman8 roman8vec ReEncodeSmall
% then
%    /Times-Roman8 findfont 12 scalefont setfont
%
% then you can say (\304 \320 \333) show
%
/inch {72 mul} def

%/Times-Roman /Times-Roman8 roman8vec ReEncodeSmall

% the followin procedure is from Adobe_distill 1.0

 /REMAP { %def
   FontDirectory 2 index known { pop pop pop } { %ifelse
     findfont begin currentdict dup length dict begin
       { 1 index /FID ne {def}{pop pop} ifelse } forall
       exch dup length 0 gt { /Encoding exch def }{ pop } ifelse
     currentdict end end definefont pop
   } ifelse
 }  def

/appencoding
[
  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
  /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
  /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon
  /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N
  /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright
  /asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o
  /p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef
  /Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis/Udieresis
  /aacute/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute
  /egrave/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis
  /ntilde/oacute/ograve/ocircumflex/odieresis/otilde/uacute/ugrave
  /ucircumflex/udieresis/dagger/.notdef/cent/sterling/section
  /bullet/paragraph/germandbls/registered/copyright/trademark
  /acute/dieresis/.notdef/AE/Oslash/.notdef/.notdef/.notdef/.notdef
  /yen/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/ordfeminine
  /ordmasculine/.notdef/ae/oslash/questiondown/exclamdown/logicalnot
  /.notdef/florin/.notdef/.notdef/guillemotleft/guillemotright
  /ellipsis/.notdef/Agrave/Atilde/Otilde/OE/oe/endash/emdash/quotedblleft
  /quotedblright/quoteleft/quoteright/.notdef/.notdef/ydieresis
  /Ydieresis/fraction/currency/guilsinglleft/guilsinglright/fi
  /fl/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand
  /Acircumflex/Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex
  /Idieresis/Igrave/Oacute/Ocircumflex/.notdef/Ograve/Uacute/Ucircumflex
  /Ugrave/dotlessi/circumflex/tilde/macron/breve/dotaccent/ring
  /cedilla/hungarumlaut/ogonek/caron
] def

%/appencoding
%[
%  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
%  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
%  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
%  /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
%  /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
%  /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
%  /zero/one/two/three/four/five/six/seven/eight/nine/colon/semicolon
%  /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N
%  /O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright
%  /asciicircum/underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o
%  /p/q/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/asciitilde
%  /fraction /quotesingle /quotedblleft /guilsinglleft /guilsinglright
%  /fi /endash /dagger
%  /daggerdbl /periodcentered /quotesinglbase /quotedblbase
%  /quotedblright /ellipsis /perthousand /breve
%  /dotaccent /dieresis /cedilla /hungarumlaut /ogonek /caron /Lslash /OE
%  /dotlessi /lslash /oe /Ecircumflex /Edieresis /Egrave /Eth
%  /Icircumflex
%  /Idieresis /Agrave /Acircumflex /Egrave /Ecircumflex /Edieresis
%  /Icircumflex /Idieresis
%  /acute /grave /circumflex /dieresis /tilde /Ugrave /Ucircumflex /fl
%  /macron /Yacute /yacute /degree /Ccedilla /ccedilla /Ntilde /ntilde
%  /exclamdown /questiondown /currency /sterling /yen /section /florin
%  /cent
%  /acircumflex /ecircumflex /ocircumflex /ucircumflex /aacute /eacute
%  /oacute /uacute
%  /agrave /egrave /ograve /ugrave /adieresis /edieresis /odieresis
%  /udieresis
%  /Aring /icircumflex /Oslash /AE /aring /iacute /oslash /ae
%  /Adieresis /igrave /Odieresis /Udieresis /Eacute /idieresis
%  /germandbls /Ocircumflex
%  /Aacute /Atilde /atilde /Zcaron /zcaron /Iacute /Igrave /Oacute
%  /Ograve /Otilde /otilde /Scaron /scaron /Uacute /Ydieresis /ydieresis
%  /Thorn /thorn /bullet /mu /paragraph /threequarters /emdash
%  /onequarter
%  /onehalf /ordfeminine /ordmasculine /guillemotleft /brokenbar
%  /guillemotright /plusminus /eth
%  
%]def

%
%
/lineskip -13 def
/showline
	{ gsave show grestore
	  0 lineskip rmoveto } def
%
appencoding /Times-Roman8 /Times-Roman REMAP

/Times-Roman8 findfont 12 scalefont setfont

1.0 inch 11.0 inch moveto

1.0 inch 10 inch  translate
0 0 moveto
%
(Roman 8 characters and HP keyboard) showline

% with 3 digit escape codes
(\304 \320 \333) showline

% with 8 bit characters!
(D P [) showline
showpage
1.0 inch 10 inch  translate
0 0 moveto
%
(Roman 8 characters and HP keyboard) showline

((  8#201 /quotesingle	 scribe 169) showline
(  8#202 /quotedblleft	 scribe 170) showline
(  8#203 /guilsinglleft   scribe 172) showline
(  8#204 /guilsinglright  scribe 173) showline
(  8#205 /fi		 scribe 174) showline
(  8#206 /endash		 scribe 177) showline
(  8#207 /dagger		 scribe 178) showline

(  8#210 /daggerdbl	 scribe 179) showline
(	  8#211 /periodcentered  scribe 180) showline
(
  8#212 /quotesinglbase  scribe 184) showline
(  8#213 /quotedblbase    scribe 185) showline
(  8#214 /quotedblright   scribe 186) showline
(
(  8#216 /perthousand	 scribe 189) showline
(  8#217 /breve		 scribe 198) showline

( 8#220 /dotaccent	 scribe 199) showline
(  8#221 /dieresis	 scribe 200) showline
(  8#222 /cedilla	 scribe 203) showline
(  8#223 /hungarumlaut	 scribe 205) showline
(  8#224 /ogonek		 scribe 206) showline
(  8#225 /caron		 scribe 207) showline
(  8#226 /Lslash		 scribe 232) showline
(  8#227 /OE		 scribe 234) showline

(  8#230 /dotlessi	 scribe 245) showline
(  8#231 /lslash		 scribe 248) showline
(  8#232 /oe		 scribe 250) showline
(  8#233 /Ecircumflex	 unassigned) showline
(  8#234 /Edieresis	 unassigned) showline
(  8#235 /Egrave		 unassigned) showline
(  8#236 /Eth		 unassigned) showline
(  8#237 /Icircumflex	 unassigned) showline

(   8#240 /Idieresis	 unassigned) showline
(!    8#241 /Agrave) showline
("    8#242 /Acircumflex) showline
(#    8#243 /Egrave) showline
($    8#244 /Ecircumflex) showline
(%    8#245 /Edieresis) showline
(&    8#246 /Icircumflex) showline
('    8#247 /Idieresis) showline

((    8#250 /acute) showline
()    8#251	/grave) showline
(*    8#252 /circumflex) showline
(+    8#253 /dieresis) showline
(,    8#254 /tilde) showline
(-    8#255 /Ugrave) showline
(.    8#256 /Ucircumflex) showline
(/    8#257 /fl  - /ItalianLira  missing from Postscript use fl) showline

(0    8#260 /macron) showline
(1    8#261 /Yacute) showline
(2    8#262 /yacute) showline
(3    8#263 /ring) showline
(4    8#264 /Ccedilla) showline
(5    8#265 /ccedilla) showline
(6    8#266 /Ntilde) showline
(7    8#267 /ntilde) showline

(8    8#270 /exclamdown) showline
(9    8#271	/questiondown) showline
(:    8#272 /currency) showline
(;    8#273 /sterling) showline
(<    8#274 /yen) showline
(=    8#275 /section) showline
(>    8#276 /florin) showline
(?    8#277 /cent) showline

showpage
1.0 inch 10 inch  translate
0 0 moveto
%
(Roman 8 characters and HP keyboard) showline

(@    8#300 /acircumflex) showline
(A    8#301	/ecircumflex) showline
(B    8#302 /ocircumflex) showline
(C    8#303 /ucircumflex) showline
(D    8#304 /aacute) showline
(E    8#305 /eacute) showline
(F    8#306 /oacute) showline
(G    8#307 /uacute) showline

(H    8#310 /agrave) showline
(I    8#311	/egrave) showline
(J    8#312 /ograve) showline
(K    8#313 /ugrave) showline
(L    8#314 /adieresis) showline
(M    8#315 /edieresis) showline
(N    8#316 /odieresis) showline
(O    8#317 /udieresis) showline

(P    8#320 /Aring) showline
(Q    8#321 /icircumflex) showline
(R    8#322 /Oslash) showline
(S    8#323 /AE) showline
(T    8#324 /aring) showline
(U    8#325 /iacute) showline
(V    8#326 /oslash) showline
(W    8#327 /ae) showline

(X    8#330 /Adieresis) showline
(Y    8#331 /igrave) showline
(Z    8#332 /Odieresis) showline
([    8#333 /Udieresis) showline
(\    8#334 /Eacute) showline
(]    8#335 /idieresis) showline
(^    8#336 /germandbls) showline
(_    8#337 /Ocircumflex) showline
showpage
1.0 inch 10 inch  translate
0 0 moveto
%
(Roman 8 characters and HP keyboard) showline

(`    8#340 /Aacute) showline
(a    8#341 /Atilde) showline
(b    8#342 /atilde) showline
(c    8#343 /Zcaron - /Dstroke missing from Postscript use Zcaron) showline
(d    8#344 /zcaron - /dstroke missing from Postscript use zcaron) showline
(e    8#345 /Iacute) showline
(f    8#346 /Igrave) showline
(g    8#347 /Oacute) showline

(h    8#350 /Ograve) showline
(i    8#351	/Otilde) showline
(j    8#352 /otilde) showline
(k    8#353 /Scaron) showline
(l    8#354 /scaron) showline
(m    8#355 /Uacute) showline
(n    8#356 /Ydieresis) showline
(o    8#357 /ydieresis) showline

(p    8#360 /Thorn) showline
(q    8#361 /thorn) showline
(r    8#362 /bullet) showline
(s    8#363 /mu) showline
(t    8#364 /paragraph) showline
(u    8#365 /threequarters - /IO  missing from Postscript use 3/4) showline
(v    8#366 /emdash) showline
(w    8#367 /onequarter) showline

(x    8#370 /onehalf) showline
(y    8#371	/ordfeminine) showline
(z    8#372 /ordmasculine) showline
({    8#373 /guillemotleft) showline
(|    8#374 /brokenbar - /solidbox  missing from Postscript use brokenbar) showline
(}     8#375 /guillemotright) showline
(~    8#376 /plusminus) showline
(    8#377 /eth  use "eth" as the symbol in the 16#FF slot) showline

showpage