%PS% % % celtic2.qs % % This PostScript code is for use with the QuikScript typesetting package % developed by Graham Freeman (http:/www.cs.adfa.edu.au/~gfreeman/). % When included with the Qs header, this file will reencode the standard % fonts to contain all the defined characters in the ISO 8859/8 (Celtic) % encoding. E.g. % cat Qs celtic2.qs yourfile.qs | lpr % % Based on code developed by Derek J. McKay, 10-Nov-1997, 16-May-1999. % Modified to allow documents containing this to be converted to DSC-complying % form using "distillery". % % This will take all of the standard fonts usually present in a PostScript % machine and re-encode them to use the ISO-8859-8 encoding vector. % It provides the characters listed in "SpecialChars" below, positioning the % required accent glyph centred on the base character. Typographically, this % is successful for most fonts. There are some characters where the dot could % be better placed, particularly in the italic versions. % new-font intermediate-font original-font MakeCeltFont - /MakeCeltFont { findfont dup length dict begin { 1 index /FID eq 2 index /Encoding eq or 2 index /UniqueID eq or {pop pop}{def}ifelse } forall /Encoding ISO8859_8_vec def dup currentdict end definefont pop 11 dict begin /BasefontName exch def /FontName exch def /FontType 3 def BasefontName findfont dup /FontBBox get /FontBBox exch def /Encoding ISO8859_8_vec def /FontMatrix get /FontMatrix exch def /SpecialChars 30 dict begin /Bdot [(B)(\227)] def /bdot [(b)(\227)] def /Cdot [(C)(\227)] def /cdot [(c)(\227)] def /Ddot [(D)(\227)] def /ddot [(d)(\227)] def /Fdot [(F)(\227)] def /fdot [(f)(\227)] def /Gdot [(G)(\227)] def /gdot [(g)(\227)] def /Mdot [(M)(\227)] def /mdot [(m)(\227)] def /Pdot [(P)(\227)] def /pdot [(p)(\227)] def /Sdot [(S)(\227)] def /sdot [(s)(\227)] def /Tdot [(T)(\227)] def /tdot [(t)(\227)] def /Wacute [(W)(\222)] def /wacute [(w)(\222)] def /Wgrave [(W)(\221)] def /wgrave [(w)(\221)] def /Wcircumflex [(W)(\223)] def /wcircumflex [(w)(\223)] def /Wdieresis [(W)(\230)] def /wdieresis [(w)(\230)] def /Ygrave [(Y)(\221)] def /ygrave [(y)(\221)] def /Ycircumflex [(Y)(\223)] def /ycircumflex [(y)(\223)] def currentdict end def /BuildChar { exch begin BasefontName findfont 1000 scalefont setfont Encoding 1 index get SpecialChars exch 2 copy known { get aload pop 1 index stringwidth newpath 0 0 moveto 3 index true charpath flattenpath pathbbox newpath 0 0 moveto 6 index true charpath flattenpath pathbbox 8 copy pop neg exch pop exch sub 3 -1 roll add 4 -1 roll add 3 1 roll pop pop 2 div newpath 0 0 moveto (X) true charpath flattenpath pathbbox 4 1 roll pop pop pop newpath 0 0 moveto (x) true charpath flattenpath pathbbox 4 1 roll pop pop pop dup 3 1 roll sub dup 2 div 3 -1 roll add 7 index ge {pop 0} if 2 copy 14 2 roll 2 copy 5 -1 roll add 7 1 roll 4 -1 roll add 6 1 roll 3 -1 roll add 5 1 roll add 4 1 roll 5 -1 roll 2 copy gt {pop}{exch pop} ifelse 7 1 roll 4 -1 roll 2 copy gt {pop}{exch pop} ifelse 6 1 roll 3 -1 roll 2 copy lt {pop} {exch pop} ifelse 5 1 roll 2 copy lt {pop}{exch pop} ifelse 4 1 roll setcachedevice moveto show 0 0 moveto show pop } { pop pop ( ) dup 0 3 index put dup stringwidth newpath 0 0 moveto 3 -1 roll true charpath flattenpath pathbbox setcachedevice Encoding exch get 0 0 moveto glyphshow }ifelse end } def FontName currentdict end definefont pop } def /ISO8859_8_vec [ /.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/quoteright /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/quoteleft/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 % WARNING: Characters in the next block are *not* in the ISO 8859-8 encoding. % Thay have been included for either use in the construction of % new characters or for convenience. /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /dotlessi/grave/acute/circumflex/tilde/macron/breve/dotaccent /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron % ISO 8859-8 encoding % Character name %C,code% Octal code in PS string /nbspace /Bdot /bdot % 160 161 162 \240 \241 \242 /sterling /Cdot /cdot % 163 164 165 \243 \244 \245 /Ddot /section /Wgrave % 166 167 168 \246 \247 \250 /copyright /Wacute /ddot % 169 170 171 \251 \252 \253 /Ygrave /hyphen /dotlessi % 172 173 174 \254 \255 \256 /Ydieresis /Fdot /fdot % 175 176 177 \257 \260 \261 /Gdot /gdot /Mdot % 178 179 180 \262 \263 \264 /mdot /paragraph /Pdot % 181 182 183 \265 \266 \267 /wgrave /pdot /wacute % 184 185 186 \270 \271 \272 /Sdot /ygrave /Wdieresis % 187 188 189 \273 \274 \275 /wdieresis /sdot /Agrave % 190 191 192 \276 \277 \300 /Aacute /Acircumflex /Atilde % 193 194 195 \301 \302 \303 /Adieresis /Aring /AE % 196 197 198 \304 \305 \306 /Ccedilla /Egrave /Eacute % 199 200 201 \307 \310 \311 /Ecircumflex /Edieresis /Igrave % 202 203 204 \312 \313 \314 /Iacute /Icircumflex /Idieresis % 205 206 207 \315 \316 \317 /Wcircumflex /Ntilde /Ograve % 208 209 210 \320 \321 \322 /Oacute /Ocircumflex /Otilde % 211 212 213 \323 \324 \325 /Odieresis /Tdot /Oslash % 214 215 216 \326 \327 \330 /Ugrave /Uacute /Ucircumflex % 217 218 219 \331 \332 \333 /Udieresis /Yacute /Ycircumflex % 220 221 222 \334 \335 \336 /germandbls /agrave /aacute % 223 224 225 \337 \340 \341 /acircumflex /atilde /adieresis % 226 227 228 \342 \343 \344 /aring /ae /ccedilla % 229 230 231 \345 \346 \347 /egrave /eacute /ecircumflex % 232 233 234 \350 \351 \352 /edieresis /igrave /iacute % 235 236 237 \353 \354 \355 /icircumflex /idieresis /wcircumflex % 238 239 240 \356 \357 \360 /ntilde /ograve /oacute % 241 242 243 \361 \362 \363 /ocircumflex /otilde /odieresis % 244 245 246 \364 \365 \366 /tdot /oslash /ugrave % 247 248 249 \367 \370 \371 /uacute /ucircumflex /udieresis % 250 251 252 \372 \373 \374 /yacute /ycircumflex /ydieresis % 253 254 255 \375 \376 \377 ] def % All code that follows has been taken from "europfnt.qs" by G.Freeman, % with only very slight modification. /FontVec [ /Times-Roman /Times-Roman-Celtic /Times-Roman-Latin1 /Times-Italic /Times-Italic-Celtic /Times-Italic-Latin1 /Times-Bold /Times-Bold-Celtic /Times-Bold-Latin1 /Times-BoldItalic /Times-BoldItalic-Celtic /Times-BoldItalic-Latin1 /Helvetica /Helvetica-Celtic /Helvetica-Latin1 /Helvetica-Oblique /Helvetica-Oblique-Celtic /Helvetica-Oblique-Latin1 /Helvetica-Bold /Helvetica-Bold-Celtic /Helvetica-Bold-Latin1 /Helvetica-BoldOblique /Helvetica-BoldOblique-Celtic /Helvetica-BoldOblique-Latin1 /Courier /Courier-Celtic /Courier-Latin1 /Courier-Oblique /Courier-Oblique-Celtic /Courier-Oblique-Latin1 /Courier-Bold /Courier-Bold-Celtic /Courier-Bold-Latin1 /Courier-BoldOblique /Courier-BoldOblique-Celtic /Courier-BoldOblique-Latin1 /Palatino-Roman /Palatino-Roman-Celtic /Palatino-Roman-Latin1 /Palatino-Italic /Palatino-Italic-Celtic /Palatino-Italic-Latin1 /Palatino-Bold /Palatino-Bold-Celtic /Palatino-Bold-Latin1 /Palatino-BoldItalic /Palatino-BoldItalic-Celtic /Palatino-BoldItalic-Latin1 /NewCenturySchlbk-Roman /NewCenturySchlbk-Roman-Celtic /NewCenturySchlbk-Roman-Latin1 /NewCenturySchlbk-Italic /NewCenturySchlbk-Italic-Celtic /NewCenturySchlbk-Italic-Latin1 /NewCenturySchlbk-Bold /NewCenturySchlbk-Bold-Celtic /NewCenturySchlbk-Bold-Latin1 /NewCenturySchlbk-BoldItalic /NewCenturySchlbk-BoldItalic-Celtic /NewCenturySchlbk-BoldItalic-Latin1 /Bookman-Light /Bookman-Light-Celtic /Bookman-Light-Latin1 /Bookman-LightItalic /Bookman-LightItalic-Celtic /Bookman-LightItalic-Latin1 /Bookman-Demi /Bookman-Demi-Celtic /Bookman-Demi-Latin1 /Bookman-DemiItalic /Bookman-DemiItalic-Celtic /Bookman-DemiItalic-Latin1 /AvantGarde-Book /AvantGarde-Book-Celtic /AvantGarde-Book-Latin1 /AvantGarde-BookOblique /AvantGarde-BookOblique-Celtic /AvantGarde-BookOblique-Latin1 /AvantGarde-Demi /AvantGarde-Demi-Celtic /AvantGarde-Demi-Latin1 /AvantGarde-DemiOblique /AvantGarde-DemiOblique-Celtic /AvantGarde-DemiOblique-Latin1 /Helvetica-Narrow /Helvetica-Narrow-Celtic /Helvetica-Narrow-Latin1 /Helvetica-Narrow-Oblique /Helvetica-Narrow-Oblique-Celtic /Helvetica-Narrow-Oblique-Latin1 /Helvetica-Narrow-Bold /Helvetica-Narrow-Bold-Celtic /Helvetica-Narrow-Bold-Latin1 /Helvetica-Narrow-BoldOblique /Helvetica-Narrow-BoldOblique-Celtic /Helvetica-Narrow-BoldOblique-Latin1 ] def % item table no-entries/line TabSearch item index true % item false /TabSearch { 1 index length 1 index idiv 1 sub 0 1 3 -1 roll {1 index mul dup 3 index exch get 4 index eq {3 1 roll pop pop true exit}{pop}ifelse}for dup type /booleantype ne {pop pop false}if } def QSdict begin userdict begin 0 1 FontVec length 3 idiv 1 sub { 3 mul dup FontVec exch get dup dup {findfont} stopped {pop pop pop exit}{pop}ifelse FontVec 3 index 1 add get dup 4 1 roll exch FontVec 6 -1 roll 2 add get exch MakeCeltFont /I 0 def {Font I get 1 index eq { pop Font I 3 -1 roll put exit} { /I I 1 add def} ifelse } loop } for end end PE %FN%%FN%