📄 gs_cff.ps
字号:
% Copyright (C) 1997 Aladdin Enterprises. All rights reserved.
%
% This file is part of Aladdin Ghostscript.
%
% Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author
% or distributor accepts any responsibility for the consequences of using it,
% or for whether it serves any particular purpose or works at all, unless he
% or she says so in writing. Refer to the Aladdin Ghostscript Free Public
% License (the "License") for full details.
%
% Every copy of Aladdin Ghostscript must include a copy of the License,
% normally in a plain ASCII text file named PUBLIC. The License grants you
% the right to copy, modify and redistribute Aladdin Ghostscript, but only
% under certain conditions described in the License. Among other things, the
% License requires that the copyright notice and this notice be preserved on
% all copies.
% $Id: gs_cff.ps $
% Loader for CFF (compressed) fonts.
% The following are not implemented yet:
% Deleted entries in the Name Index
% Embedded PostScript
% Multiple Master fonts
% CIDFonts
% Chameleon fonts
% Synthetic fonts
% Also, Type 2 charstrings are converted into Type 1 fonts with
% CharstringType = 2, which may or may not be supported.
30 dict begin
% ---------------- Standard strings (actually names) ---------------- %
/StandardStrings mark
% 0
/.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
% 50
/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 /exclamdown /cent /sterling /fraction
% 100
/yen /florin /section /currency /quotesingle
/quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi
/fl /endash /dagger /daggerdbl /periodcentered
/paragraph /bullet /quotesinglbase /quotedblbase /quotedblright
/guillemotright /ellipsis /perthousand /questiondown /grave
/acute /circumflex /tilde /macron /breve
/dotaccent /dieresis /ring /cedilla /hungarumlaut
/ogonek /caron /emdash /AE /ordfeminine
/Lslash /Oslash /OE /ordmasculine /ae
/dotlessi /lslash /oslash /oe /germandbls
% 150
/onesuperior /logicalnot /mu /trademark /Eth
/onehalf /plusminus /Thorn /onequarter /divide
/brokenbar /degree /thorn /threequarters /twosuperior
/registered /minus /eth /multiply /threesuperior
/copyright /Aacute /Acircumflex /Adieresis /Agrave
/Aring /Atilde /Ccedilla /Eacute /Ecircumflex
/Edieresis /Egrave /Iacute /Icircumflex /Idieresis
/Igrave /Ntilde /Oacute /Ocircumflex /Odieresis
/Ograve /Otilde /Scaron /Uacute /Ucircumflex
/Udieresis /Ugrave /Yacute /Ydieresis /Zcaron
% 200
/aacute /acircumflex /adieresis /agrave /aring
/atilde /ccedilla /eacute /ecircumflex /edieresis
/egrave /iacute /icircumflex /idieresis /igrave
/ntilde /oacute /ocircumflex /odieresis /ograve
/otilde /scaron /uacute /ucircumflex /udieresis
/ugrave /yacute /ydieresis /zcaron /exclamsmall
/Hungarumlautsmall /dollaroldstyle /dollarsuperior /ampersandsmall /Acutesmall
/parenleftsuperior /parenrightsuperior /twodotenleader /onedotenleader /zerooldstyle
/oneoldstyle /twooldstyle /threeoldstyle /fouroldstyle /fiveoldstyle
/sixoldstyle /sevenoldstyle /eightoldstyle /nineoldstyle /commasuperior
% 250
/threequartersemdash /periodsuperior /questionsmall /asuperior /bsuperior
/centsuperior /dsuperior /esuperior /isuperior /lsuperior
/msuperior /nsuperior /osuperior /rsuperior /ssuperior
/tsuperior /ff /ffi /ffl /parenleftinferior
/parenrightinferior /Circumflexsmall /hyphensuperior /Gravesmall /Asmall
/Bsmall /Csmall /Dsmall /Esmall /Fsmall
/Gsmall /Hsmall /Ismall /Jsmall /Ksmall
/Lsmall /Msmall /Nsmall /Osmall /Psmall
/Qsmall /Rsmall /Ssmall /Tsmall /Usmall
/Vsmall /Wsmall /Xsmall /Ysmall /Zsmall
% 300
/colonmonetary /onefitted /rupiah /Tildesmall /exclamdownsmall
/centoldstyle /Lslashsmall /Scaronsmall /Zcaronsmall /Dieresissmall
/Brevesmall /Caronsmall /Dotaccentsmall /Macronsmall /figuredash
/hypheninferior /Ogoneksmall /Ringsmall /Cedillasmall /questiondownsmall
/oneeighth /threeeighths /fiveeighths /seveneighths /onethird
/twothirds /zerosuperior /foursuperior /fivesuperior /sixsuperior
/sevensuperior /eightsuperior /ninesuperior /zeroinferior /oneinferior
/twoinferior /threeinferior /fourinferior /fiveinferior /sixinferior
/seveninferior /eightinferior /nineinferior /centinferior /dollarinferior
/periodinferior /commainferior /Agravesmall /Aacutesmall /Acircumflexsmall
% 350
/Atildesmall /Adieresissmall /Aringsmall /AEsmall /Ccedillasmall
/Egravesmall /Eacutesmall /Ecircumflexsmall /Edieresissmall /Igravesmall
/Iacutesmall /Icircumflexsmall /Idieresissmall /Ethsmall /Ntildesmall
/Ogravesmall /Oacutesmall /Ocircumflexsmall /Otildesmall /Odieresissmall
/OEsmall /Oslashsmall /Ugravesmall /Uacutesmall /Ucircumflexsmall
/Udieresissmall /Yacutesmall /Thornsmall /Ydieresissmall (001.000)
(001.001) (001.002) (001.003) /Black /Bold
/Book /Light /Medium /Regular /Roman
/Semibold
.packtomark def
% ---------------- Standard encodings ---------------- %
/StandardEncodings [
% StandardEncoding
mark
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 0 0 0 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
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 91 92 93 94 95 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 0 0 0 0 0
0 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
0 111 112 113 114 0 115 116 117 118 119 120 121 122 0 123
0 124 125 126 127 128 129 130 131 0 132 133 0 134 135 136
137 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 138 0 139 0 0 0 0 140 141 142 143 0 0 0 0
0 144 0 0 0 145 0 0 146 147 148 149 0 0 0 0
.packtomark
% ExpertEncoding
mark
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 0 0 0 0
1 229 230 0 231 232 233 234 235 236 237 238 13 14 15 99
239 240 241 242 243 244 245 246 247 248 27 28 249 250 251 252
0 253 254 255 256 257 0 0 0 258 0 0 259 260 261 262
0 0 263 264 265 0 266 109 110 267 268 269 0 270 271 272
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 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 0 0 0 0 0
0 304 305 306 0 0 307 308 309 310 311 0 312 0 0 313
0 0 314 315 0 0 316 317 318 0 0 0 158 155 163 319
320 321 322 323 324 325 0 0 326 150 164 169 327 328 329 330
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
.packtomark
] readonly def
% ---------------- Standard Charsets ---------------- %
% We include an explicit 0 at the beginning of each charset.
/StandardCharsets [
% ISOAdobe
mark
0
1 1 228 { } for
.packtomark
% Expert
mark
0
1 229 230 231 232 233 234 235 236 237 238 13 14 15 99 239
240 241 242 243 244 245 246 247 248 27 28 249 250 251 252 253
254 255 256 257 258 259 260 261 262 263 264 265 266 109 110 267
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
316 317 318 158 155 163 319 320 321 322 323 324 325 326 150 164
169 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373
374 375 376 377 378
.packtomark
% ExpertSubset
mark
0
1 231 232 235 236 237 238 13 14 15 99 239 240 241 242 243
244 245 246 247 248 27 28 249 250 251 253 254 255 256 257 258
259 260 261 262 263 264 265 266 109 110 267 268 269 270 272 300
301 302 305 314 315 158 155 163 320 321 322 323 324 325 326 150
164 169 327 328 329 330 331 332 333 334 335 336 337 338 339 340
341 342 343 344 345 346
.packtomark
] readonly def
% ---------------- Font loading ---------------- %
% ------ Utilities ------ %
/advance { % <n> advance -
f cff eq { /pos pos 3 -1 roll add store } { pop } ifelse
} def
/next { % - next <byte>
f read { 1 advance } if
} def
/nextstring { % <length> nextstring <string>
dup 0 eq {
pop ()
} {
string f exch readstring pop dup length advance
} ifelse
} def
/card8 % - card8 <card8>
/next load
def
/card16 { % - card16 <card16>
card8 8 bitshift card8 add
} def
/offset { % <offsize> offset <offset>
0 exch { 8 bitshift next add } repeat
} def
/sid % - <sid> sid
/card16 load
def
/Index { % - Index <array>
mark card16 dup 0 ne {
1 exch next dup offset pop exch {
dup offset dup 4 -1 roll sub 3 1 roll exch
} repeat pop
} if pop .packtomark
[ exch { nextstring } forall ] readonly
} def
/tokens { % - tokens <num1> ... <op#> (op# = 12 means EOF)
{
f read not { 12 exit } if
1 advance
dup 12 eq { pop next 32 add exit } if
dup 28 lt { exit } if
dup 32 lt {
28 sub {
{ card16 32768 xor 32768 sub }
{ 4 offset dup 16#7fffffff gt { -1 32 bitshift add } if }
{ tokenreal }
{ 31 exit }
} exch get exec
} {
dup 247 lt {
139 sub
} {
247 sub {
{ next 108 add }
{ next 364 add }
{ next 620 add }
{ next 876 add }
{ next 108 add neg }
{ next 364 add neg }
{ next 620 add neg }
{ next 876 add neg }
% 255 is deliberately omitted and will cause a rangecheck
} exch get exec
} ifelse
} ifelse
} loop
} def
/tokenbuf 100 string def
/tokenput { % <index> <char> tokenput <index+1>
tokenbuf 2 index 3 -1 roll put 1 add
} def
/tokenrealarray [
(0123456789.E) { } forall
[(E) 0 get /tokenput cvx (-) 0 get] cvx
null % will give an error
(-) 0 get
{ exit }
] readonly def
/tokenreal { % - tokenreal <float>
0 {
next exch 1 index -4 bitshift tokenrealarray exch get exec tokenput
% We must leave the byte on the stack temporarily so that
% the exit will see a consistent stack state.
1 index 15 and tokenrealarray exch get exec tokenput exch pop
} loop
tokenbuf 0 3 -1 roll getinterval cvr exch pop
} def
/Dict { % <opsdict> Dict -
/opdict exch store {
mark tokens opdict exch .knownget { exec } if cleartomark
} loop cleartomark
} def
/idstring { % <sid> idstring <string|name>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -