📄 ps-prin1.ps
字号:
% === BEGIN ps-print prologue 1% version: 6.0% Copyright (C) 2000, 2001 Free Software Foundation, Inc.%% This file is part of GNU Emacs.%% GNU Emacs 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.%% GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the% Free Software Foundation, Inc., 59 Temple Place - Suite 330,% Boston, MA 02111-1307, USA.% As a special exception, the copyright holders of this module give% you permission to include the module in a Postscript file generated% by Emacs or other free software together with the result of% converting text to be printed, regardless of the license terms of% that text, and to use under terms of your choice the page images% resulting from formatting said combination. If you modify this% module, you may extend this exception to your version of the module% but you are not obligated to do so. If you do not wish to do so,% delete this exception statement from your version.% ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:/ISOLatin1Encoding where{pop}{% -- The ISO Latin-1 encoding vector isn't known, so define it.% -- The first half is the same as the standard encoding,% -- except for minus instead of hyphen at code 055./ISOLatin1EncodingStandardEncoding 0 45 getinterval aload pop /minusStandardEncoding 46 82 getinterval aload pop%*** NOTE: the following are missing in the Adobe documentation,%*** but appear in the displayed table:%*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240.% 0200 (128) /.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% 0240 (160) /space/exclamdown/cent/sterling /currency/yen/brokenbar/section /dieresis/copyright/ordfeminine/guillemotleft /logicalnot/hyphen/registered/macron /degree/plusminus/twosuperior/threesuperior /acute/mu/paragraph/periodcentered /cedilla/onesuperior/ordmasculine/guillemotright /onequarter/onehalf/threequarters/questiondown% 0300 (192) /Agrave/Aacute/Acircumflex/Atilde /Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis /Igrave/Iacute/Icircumflex/Idieresis /Eth/Ntilde/Ograve/Oacute /Ocircumflex/Otilde/Odieresis/multiply /Oslash/Ugrave/Uacute/Ucircumflex /Udieresis/Yacute/Thorn/germandbls% 0340 (224) /agrave/aacute/acircumflex/atilde /adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis /igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute /ocircumflex/otilde/odieresis/divide /oslash/ugrave/uacute/ucircumflex /udieresis/yacute/thorn/ydieresis256 packedarray def}ifelse/reencodeFontISO{ %def dup length 12 add dict % Make a new font (a new dict the same size % as the old one) with room for our new symbols. begin % Make the new font the current dictionary. % Copy each of the symbols from the old dictionary % to the new one except for the font ID. {1 index/FID ne{def}{pop pop}ifelse}forall % Override the encoding with the ISOLatin1 encoding. currentdict/FontType get 0 ne{/Encoding ISOLatin1Encoding def}if % Use the font's bounding box to determine the ascent, descent, % and overall height; don't forget that these values have to be % transformed using the font's matrix.% ^ (x2 y2)% | |% | v% | +----+ - -% | | | ^% | | | | Ascent (usually > 0)% | | | |% (0 0) -> +--+----+-------->% | | |% | | v Descent (usually < 0)% (x1 y1) --> +----+ - - currentdict/FontType get 0 ne {/FontBBox load aload pop % -- x1 y1 x2 y2 FontMatrix transform/Ascent exch def pop FontMatrix transform/Descent exch def pop} {/PrimaryFont FDepVector 0 get def PrimaryFont/FontBBox get aload pop PrimaryFont/FontMatrix get transform/Ascent exch def pop PrimaryFont/FontMatrix get transform/Descent exch def pop}ifelse /FontHeight Ascent Descent sub def % use `sub' because descent < 0 % Define these in case they're not in the FontInfo % (also, here they're easier to get to). /UnderlinePosition Descent 0.70 mul def /OverlinePosition Descent UnderlinePosition sub Ascent add def /StrikeoutPosition Ascent 0.30 mul def /LineThickness FontHeight 0.05 mul def /Xshadow FontHeight 0.08 mul def /Yshadow FontHeight -0.09 mul def /SpaceBackground Descent neg UnderlinePosition add def /XBox Descent neg def /YBox LineThickness 0.7 mul def currentdict % Leave the new font on the stack end % Stop using the font as the current dictionary. definefont % Put the font into the font dictionary pop % Discard the returned font.}bind def% Font definition/DefFont{findfont exch scalefont reencodeFontISO}def% Font selection/F{ findfont dup/Ascent get/Ascent exch def dup/Descent get/Descent exch def dup/FontHeight get/FontHeight exch def dup/UnderlinePosition get/UnderlinePosition exch def dup/OverlinePosition get/OverlinePosition exch def dup/StrikeoutPosition get/StrikeoutPosition exch def dup/LineThickness get/LineThickness exch def dup/Xshadow get/Xshadow exch def dup/Yshadow get/Yshadow exch def dup/SpaceBackground get/SpaceBackground exch def dup/XBox get/XBox exch def dup/YBox get/YBox exch def setfont}def/FG/setrgbcolor load def/bg false def/BG{ dup/bg exch def {[4 1 roll]} {[1.0 1.0 1.0]} ifelse /bgcolor exch def}def% B width C% +-----------+% | Ascent (usually > 0)% A + +% | Descent (usually < 0)% +-----------+% E width D/dobackground{ % width -- currentpoint % -- width x y gsave newpath moveto % A (x y) 0 Ascent rmoveto % B dup 0 rlineto % C 0 Descent Ascent sub rlineto % D neg 0 rlineto % E closepath FillBgColor grestore}def/eolbg{ % dobackground until right margin PrintWidth % -- x-eol currentpoint pop % -- cur-x sub % -- width until eol dobackground}def/LineHS LineHeight LineSpacing add def/ParagraphHS LineHeight ParagraphSpacing add def/PSL{/h exch def bg{eolbg}if 0 currentpoint exch pop h sub moveto}def/PLN{PrintLineNumber{doLineNumber}if}def/SL{LineHS PSL isLineStep pop}def % Soft Linefeed/PHL{ParagraphHS PSL PLN}def % Paragraph Hard Linefeed/LHL{LineHS PSL PLN}def % Hard Linefeed% Some debug/dcp{currentpoint exch 40 string cvs print(, )print =}def/dp{print 2 copy exch 40 string cvs print(, )print =}def/W{ ( )stringwidth % Get the width of a space in the current font. pop % Discard the Y component. mul % Multiply the width of a space % by the number of spaces to plot bg{dup dobackground}if 0 rmoveto}def/Effect 0 def/EffectUnderline false def/EffectStrikeout false def/EffectOverline false def/EffectShadow false def/EffectBox false def/EffectOutline false def% effect: 1 - underline 2 - strikeout 4 - overline% 8 - shadow 16 - box 32 - outline/EF{ /Effect exch def /EffectUnderline Effect 1 and 0 ne def /EffectStrikeout Effect 2 and 0 ne def /EffectOverline Effect 4 and 0 ne def /EffectShadow Effect 8 and 0 ne def /EffectBox Effect 16 and 0 ne def /EffectOutline Effect 32 and 0 ne def}def% stack: string |- --/S{ /xx currentpoint dup Descent add/yy exch def Ascent add/YY exch def def dup stringwidth pop xx add/XX exch def EffectShadow{ /yy yy Yshadow add def /XX XX Xshadow add def }if bg{ true EffectBox {SpaceBackground doBox} {xx yy XX YY doRect} ifelse }if % background EffectBox {false 0 doBox}if % box EffectShadow {dup doShadow}if % shadow EffectOutline {true doOutline} % outline {show} % normal text ifelse EffectUnderline{UnderlinePosition Hline}if % underline EffectStrikeout{StrikeoutPosition Hline}if % strikeout EffectOverline {OverlinePosition Hline}if % overline}bind def% stack: position |- --/Hline{ currentpoint exch pop add dup gsave newpath xx exch moveto XX exch lineto closepath LineThickness setlinewidth stroke grestore}bind def% stack: fill-or-not delta |- --/doBox{ /dd exch def xx XBox sub dd sub yy YBox sub dd sub XX XBox add dd add YY YBox add dd add doRect}bind def% stack: fill-or-not lower-x lower-y upper-x upper-y |- --/doRect{ /rYY exch def /rXX exch def /ryy exch def /rxx exch def gsave newpath rXX rYY moveto rxx rYY lineto rxx ryy lineto rXX ryy lineto closepath % top of stack: fill-or-not {FillBgColor} {LineThickness setlinewidth stroke}ifelse grestore}bind def% stack: string |- --/doShadow{ gsave Xshadow Yshadow rmoveto false doOutline grestore}bind def/st 1 string def% stack: string fill-or-not |- --/doOutline{ /-fillp- exch def /-ox- currentpoint/-oy- exch def def gsave LineThickness setlinewidth {st 0 3 -1 roll put st dup true charpath -fillp- {gsave FillBgColor grestore}if stroke stringwidth -oy- add/-oy- exch def -ox- add/-ox- exch def -ox- -oy- moveto }forall grestore -ox- -oy- moveto}bind def% stack: --/FillBgColor{bgcolor aload pop setrgbcolor fill}bind def% stack: -- |- boolean/isLineStep{ SyncLineZebra {PLScounter 0 gt % or zebra {/PLScounter PLScounter 1 sub def PLScounter 0 eq} {false}ifelse PrintLineStep 1 gt {/PrintLineStep PrintLineStep 1 sub def} {/PrintLineStep ZebraHeight def /PLScounter PrintLineStart def}ifelse} {LineNumber PrintLineStart sub PrintLineStep mod 0 eq}ifelse % or line step}def% stack: --/doLineNumber{ /LineNumber where {pop isLineStep % or line step LineNumber Lines ge or % or last line {currentfont gsave LineNumberColor SetColor /L0 findfont setfont LineNumber Lines ge {(end )} {LineNumber 6 string cvs( )strcat}ifelse dup stringwidth pop neg 0 rmoveto show grestore setfont}if /LineNumber LineNumber 1 add def }if}def% stack: color-specifier |- --/SetColor{dup type/realtype eq{setgray}{aload pop setrgbcolor}ifelse}def% stack: --/printZebra{ gsave ZebraColor SetColor /double-zebra ZebraHeight ZebraHeight add def /yiter double-zebra LineHS mul neg def /xiter PrintWidth InterColumn add def /zebra-line LinesPrinted def NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat grestore}def% stack: lines-per-column |- --/doColumnZebra{ /lpc exch def gsave ZebraFollow 1 and 0 ne{ /H ZebraHeight zebra-line ZebraHeight mod sub def /lpc lpc H sub def zebra-line double-zebra mod ZebraHeight lt {H doZebra % "black" stripe followed by a "white" stripe /lpc lpc ZebraHeight sub def H ZebraHeight add} {H}ifelse % "white" stripe LineHS mul neg 0 exch rmoveto /zebra-line zebra-line LinesPerColumn add def }if /zspacing 0 def lpc dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat double-zebra mod dup 0 le{pop} {dup ZebraHeight gt {pop ZebraHeight} {/zspacing LineSpacing def ZebraFollow 2 and 0 ne{pop ZebraHeight}if}ifelse doZebra}ifelse grestore}def% stack: zebra-height (in lines) |- --/doZebra{ /zh exch 0.05 sub LineHS mul zspacing sub def gsave 0 LineHeight 0.65 mul rmoveto PrintWidth 0 rlineto 0 zh neg rlineto PrintWidth neg 0 rlineto 0 zh rlineto fill grestore}def% stack: --/printBackground{ /BackgroundColor where{ pop gsave BackgroundColor SetColor NumberOfColumns{ gsave
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -