% This file was created by Daniel Hottinger. % Swiss Federal Institure of Technology Zurich % E-Mail: hodaniel@student.ethz.ch % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation; either version 2, or (at your option) % any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; see the file COPYING. If not, write to % the Free Software Foundation, 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % % -- code follows this line -- %%DocumentNeedetResources: font Times-Italic %HeaderHeight: 72 %Format: pagenumstr $% von $= %Format: pages $= % Umlaute in Fonts codieren % Creator: Holger Gehringer % Das Programm zeigt, wie am Codierungsvektor eines Fonts kleinere Aenderungen % vorgenommen werden koennen. Mit dieser Methode ist es einfach, die Standard- % Codierung um die deutschen Umlaute zu erweitern. /Reencsmalldict 12 dict def % Lokaler Speicher fuer ReEncodeSmall % ReEncodeSmall kopiert einen existierenden Font, nimmt die angegebenen Aender- % ungen am Codierungsvektor vor und speichert die geaenderte Kopie unter einem % neuen Namen ab. Die Prozedur benoetigt drei Argumente: den Namen des Fonts, % der abgeaendert werden soll, den Namen des neuen Fonts und ein Array mit % Code/Zeichen-Paaren. /ReEncodeSmall { Reencsmalldict begin /NewCodesAndNames exch def /NewFontName exch def /BaseFontName exch def /BaseFontDict % Basis-Font suchen BaseFontName findfont def /NewFont BaseFontDict % Neues Dictionary in ausreichender Groesse maxlength dict def % schaffen BaseFontDict % Alle Eintraege des Basis-Fonts, bis auf FID- { exch dup /FID ne % Feld, werden kopiert. { dup /Encoding eq { exch dup length array copy NewFont 3 1 roll put } { exch NewFont 3 1 roll put } ifelse } { pop pop % FID-Eintrag ignorieren } ifelse } forall NewFont /FontName NewFontName put % Neuen Namen eintragen NewCodesAndNames aload pop % Wertepaare fuer Aenderung des Codierungsvek- % tors laden. NewCodesAndNames % Fuer jedes Wertepaar auf dem Stack wird der length 2 idiv % der neue Name in den Vektor eingetragen. { NewFont /Encoding get 3 1 roll put } repeat NewFontName NewFont % aus neuem Font wird POSTSCRIPT-Font; das von definefont pop % definefont gelieferte Diction. wird ignoriert end } def % Das Array dient als Parameter fuer ReEncodeSmall: es enthaelt sieben Paare, % die jeweils aus dem Code (in Oktalform) und dem Namen des Zeichens bestehen. % Die Codes wurden dem Zeichensatz des IBM-PC angepasst - bis auf das scharfe s % liegen sie in Positionen, die in der Standard-Codierung nicht besetzt sind. /GermanVec [ 8#201 /udieresis 8#204 /adieresis 8#216 /Adieresis 8#224 /odieresis 8#231 /Odieresis 8#232 /Udieresis 8#341 /germandbls ] def /do_header { % print ETH header gsave d_header_x 5 add d_header_y translate % sourrounding lines 0.4 setlinewidth 0 30 moveto d_header_w 10 sub 0 rlineto stroke 0 d_header_h moveto d_header_w 10 sub 0 rlineto stroke % Create new font with german "umlauten" /Times-Italic % Times-Italic umcodieren, so dass neuer Font /Times-Italic-German % mit deutschen Umlauten entsteht. GermanVec ReEncodeSmall /Times-Italic-German findfont 10 scalefont setfont % departement 0 15 moveto (Institut f\201r Informatik) show % filename ftail dup stringwidth pop d_header_w 10 sub exch sub 15 moveto show % username 0 3 moveto (Daniel Hottinger) show % number of pages (if more then one) % Attention: names defined by "Format" are strings % so we have to compare with (1) and not 1 :( pages (1) ne { pagenumstr dup stringwidth pop d_header_w 10 sub exch sub 3 moveto show } if % ETH-Logo 0 37 translate gsave %%BeginDocument: ETHleft.ps %!PS-Adobe-2.0 %%BoundingBox: 0 0 209 28 % % ETH logo, created by M. Lichtin, May 10, 1989 % % /rt {rlineto} def 1 254 72 div div 2 div dup scale newpath 0 0 moveto 60 200 rt % upper left corner 483 0 rt % 485 would be correct, but ... -20 -75 rt % down in 'H' letter 20 0 rt % 24 75 rt % up in 'H' letter 93 0 rt % upper right corner -60 -200 rt % lower right corner -93 0 rt % 20 75 rt % up in 'H' letter -20 0 rt % -24 -75 rt % down in 'H' letter -93 0 rt % 42 140 rt % up at left side of 'H' -60 0 rt % -42 -140 rt % down at right side of 'T' -90 0 rt % 42 140 rt % up at left side of 'T' -140 0 rt % -4 -15 rt % 80 -1 rt % small correction -15 -49 rt % -80 0 rt % -4 -15 rt % 100 0 rt % -18 -59 rt % closepath fill /Helvetica-Bold findfont [70 0 21 70 0 0] makefont setfont 638 0 moveto (Zurich) show (urich) stringwidth pop neg 8 add 0 rmoveto (\310) show 662 75 moveto (T) show -2 0 rmoveto (echnische Hochschule) show 685 150 moveto (Eidgenossische) show (ossische) stringwidth pop neg 8 add 0 rmoveto (\310) show % showpage %%EndDocument grestore % right part (multilingual) d_header_w 10 sub 184 sub 0 translate gsave %%BeginDocument: ETHright.ps %!PS-Adobe-2.0 %%BoundingBox: 0 0 184 28 % % ETH multilingual, created by M. Lichtin, May 11, 1989 % 1 254 72 div div 2 div dup scale /Helvetica findfont [65 0 19.5 65 0 0] makefont setfont 0 0 moveto (Swiss Federal Institute of Technology Zurich) show 23 75 moveto (Politecnico federale di Zurigo) show 46 150 moveto (Ecole polytechnique federale de Zurich) show (ederale de Zurich) stringwidth pop neg 8 add 0 rmoveto (\302) show (d) stringwidth pop 13 add 0 rmoveto (\302) show % showpage %%EndDocument grestore grestore } def