|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 7790 (0x1e6e) Types: TextFile Names: »pstexpsf.prc«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/mctex/postscript/pstexpsf.prc«
% If this is a later PostScript version, enable packing for all of the % definitions. systemdict /currentpacking known { /packingstat currentpacking def true setpacking } if % Here is a small routine to copy a font dictionary % to a new font dictionary, dropping the font id. % @copyfontdict: olddict newdict @copyfontdict - /@copyfontdict { exch % rearrange the stack { % for all entries, if the key (1 index) is not FID: 1 index /FID ne { % prepare to save it: stack is newdict key val 2 index 3 1 roll % now newdict newdict key val 1 index /Encoding eq { dup length array copy put } { put } ifelse } { pop pop } ifelse } forall } bd % ReEncodeForTeX: existing_name new_name ReEncodeForTeX - % %%%% Additions by LA Carr to reencode Adobe fonts as TeX fonts (almost) %%%% Based on routine in LaserWriter Cookbook /ReEncodeForTeX { /newfontname exch def /basefontname exch def /basefontdict basefontname findfont def /newfont basefontdict maxlength dict def basefontdict newfont @copyfontdict basefontdict /MathFontName known not { basefontname 30 string cvs (Courier) search { pop pop pop TeXcourvec } { pop TeXnormalvec } ifelse aload length 2 idiv { newfont /Encoding get 3 1 roll put } repeat } if newfontname newfont definefont pop } bd /TeXnormalvec [ 8#014 /fi 8#015 /fl 8#020 /dotlessi 8#022 /grave 8#023 /acute 8#024 /caron 8#025 /breve 8#026 /macron 8#027 /ring 8#030 /cedilla 8#031 /germandbls 8#032 /ae 8#033 /oe 8#034 /oslash 8#035 /AE 8#036 /OE 8#037 /Oslash 8#042 /quotedblright 8#074 /exclamdown 8#076 /questiondown 8#134 /quotedblleft 8#136 /circumflex 8#137 /dotaccent 8#173 /endash 8#174 /emdash 8#175 /hungarumlat 8#176 /tilde 8#177 /dieresis ] def /TeXcourvec [ 8#016 /exclamdown 8#017 /questiondown 8#020 /dotlessi 8#022 /grave 8#023 /acute 8#024 /caron 8#025 /breve 8#026 /macron 8#027 /ring 8#030 /cedilla 8#031 /germandbls 8#032 /ae 8#033 /oe 8#034 /oslash 8#035 /AE 8#036 /OE 8#037 /Oslash 8#074 /less 8#076 /greater 8#134 /backslash 8#136 /circumflex 8#137 /underscore 8#173 /braceleft 8#174 /bar 8#175 /braceright 8#177 /dieresis ] def /TeXPSmakefont { % defines a routine for generating PS fonts, fudged! /TeXsize exch def findfont [ TeXsize 0 0 TeXsize neg 0 0 ] makefont } bd % ObliqueFont: fontname basefontname angle ObliqueFont - % Create a General Oblique font /ObliqueFont { /ObliqueAngle exch def /ObliqueBaseName exch def /ObliqueFontName exch def /ObliqueTransform [1 0 ObliqueAngle sin ObliqueAngle cos div 1 0 0] def /basefontdict ObliqueBaseName findfont ObliqueTransform makefont def /newfont basefontdict maxlength dict def basefontdict newfont @copyfontdict newfont /FontName ObliqueFontName put ObliqueFontName newfont definefont pop } bd % Palatino-ItalicUnslanted? You must be joking! % SmallCapsFont: fontname basename SmallCapsFont - % Create a General SmallCaps font /SmallCapsFont { /SmallCapsBaseName exch def /SmallCapsFontName exch def /basefontdict SmallCapsBaseName findfont def /newfont basefontdict maxlength 10 add dict def newfont begin /FontName SmallCapsFontName def /FontBaseDict basefontdict 1000 scalefont def /FontSCDict FontBaseDict .8 scalefont def /FontType 3 def /BuildChar {SmallCapChar} def /FontMatrix dup basefontdict exch get def /FontBBox dup basefontdict exch get def /Encoding dup basefontdict exch get def end SmallCapsFontName newfont definefont pop } bd % SmallCapChar: fontdict ch SmallCapChar - % It shouldn't be so damn hard to do this (make one font out % of two others) but I tried several dozen variations on this % theme until I found something that worked. -- vj /SmallCapChar { /achar (A) def achar exch 0 exch put begin achar 0 get dup 97 ge exch 122 le and { % handle 'a' through 'z' specially achar 0 achar 0 get 32 sub put FontSCDict } { FontBaseDict } ifelse setfont achar stringwidth FontBBox setcachedevice newpath 0 0 moveto achar show end } bd /MathEncodingVec [ /Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon1 /Phi /Psi /Omega /alpha /beta /gamma /delta /epsilon /zeta /nu /theta /iota /kappa /lambda /mu /nu /xi /pi /rho /sigma /tau /upsilon /phi /chi /psi /omega /epsilon /theta1 /omega1 /rho /sigma /phi1 /arrowleft /arrowleft /arrowright /arrowright /suchthat /congruent /proportional /angle /zero /one /two /three /four /five /six /seven /eight /nine /period /comma /less /slash /greater /asteriskmath /partialdiff /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 /registerserif /copyrightserif /trademarkserif /logicalor /logicaland /section /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 /dotlessi /j /weierstrass /macron /breve ] def % the following gives the character codes of the above characters % in their font. I.e., this is the character we have to hand "show" % to image the characters above. /MathCharVec [ 71 68 81 76 88 80 83 161 70 89 87 97 98 103 100 101 122 110 113 105 107 108 109 110 120 112 114 115 116 117 102 99 121 119 101 74 118 114 115 106 172 172 174 174 39 64 181 208 48 49 50 51 52 53 54 55 56 57 46 44 60 47 62 42 182 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 210 211 212 218 217 167 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 245 106 195 197 198 ] def % this array tells which font dictionary holds each character above % (0 = basefont, 1 = symbol (maybe slanted), 2 = symbol (unslanted)). /MathDictVec [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 ] def % MathOblique: fontname basename symbolname symbolbase angle MathOblique - % Create a "math" font with the symbol font characters slanted % by "angle" /MathOblique { 3 copy ObliqueFont pop pop MathFont } bd % MathFont: fontname basename symbolname MathFont % % Create a math italic font % % We build this font out of the base & symbol fonts % using an encoding vec as close as we can get to cmmi10 with % standard postscript characters. An array parallel to the % encoding vector tells which font dictionary to use for a % particular character. /MathFont { /MathSymName exch def /MathBaseName exch def /MathFontName exch def /basefontdict MathBaseName findfont def /newfont basefontdict maxlength 10 add dict def newfont begin /FontName MathFontName def /FontDictArray [ basefontdict 1000 scalefont MathSymName findfont 950 scalefont /Symbol findfont 950 scalefont ] def /FontType 3 def /BuildChar {MathFontChar} def /FontMatrix dup basefontdict exch get def /FontBBox dup basefontdict exch get def % the encoding vector is a copy of the original font's % encoding, modified "appropriately". /Encoding dup basefontdict exch get dup length array copy def /WhichFont MathDictVec def /WhichChar MathCharVec def MathEncodingVec Encoding copy pop /achar (A) def end MathFontName newfont definefont pop } bd % MathFontChar: fontdict ch MathFontChar - % (there is some serious magic going on here: see note on % SmallCapChar above -- vj). /MathFontChar { exch begin achar exch 0 exch put FontDictArray WhichFont achar 0 get get get setfont achar dup 0 get WhichChar exch get 0 exch put achar stringwidth FontBBox setcachedevice newpath 0 0 moveto achar show end } bd % restore packing systemdict /currentpacking known {packingstat setpacking} if