|
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: 2817 (0xb01) Types: TextFile Names: »ps-fonts.psr«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/dvi-to-ps/TeXPS/dvitps/psr/ps-fonts.psr«
% Copyright (c) 1988 Stephan v. Bechtolsheim % This file is part of the TeXPS Software Package. % The TeXPS Software Package is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY. No author or distributor % accepts responsibility to anyone for the consequences of using it % or for whether it serves any particular purpose or works at all, % unless he says so in writing. Refer to the TeXPS Software Package % General Public License for full details. % Everyone is granted permission to copy, modify and redistribute % the TeXPS Software Package, but only under the conditions described in the % TeXPS Software Package General Public License. A copy of this license is % supposed to have been given to you along with TeXPS Software Package so you % can know your rights and responsibilities. It should be in a % file named CopyrightLong. Among other things, the copyright notice % and this notice must be preserved on all copies. % @newfont-ps % =========== % Generate a new font from an old font. The modification % is described by a matrix: % new-font-name [ matrix ] old-font-name @newfont-ps - /@newfont-ps { #ifdef DEBUG (begin @newfont-ps\n) print flush #endif % Save the arguments /old-font-name exch def /font-mat exch def /new-font-name exch def % In the following we have three fonts: % (a) the old font, which forms the basis % (b) the new font 2, which is the result of the 'makefont' operator % (c) the new font, which is a copied directory of (b) #ifdef DEBUG (old font name: ) print old-font-name 50 string cvs print (\n) print (new font name: ) print new-font-name 50 string cvs print (\n) print flush #endif /old-font-dict old-font-name findfont def /font-dict-2 old-font-dict font-mat makefont def % Create a new dictionary. Make a copy of the old font. /font-dict-new font-dict-2 length dict def font-dict-new begin font-dict-2 % copy everything out of font-dict-2 { % except FontBBox and FID exch dup dup /FID ne exch /FontBBox ne and { exch font-dict-new 3 1 roll put } { pop pop } ifelse } forall end /newFontBBox old-font-dict /FontBBox get % bug fix, see exercise aload length array astore def font-dict-new /FontBBox newFontBBox put font-dict-new /FontName new-font-name put % newfont /Metrics newwidths put new-font-name font-dict-new definefont pop #ifdef DEBUG (end @newfont-ps\n) print flush #endif } def #ifdef DEBUG /Setfont-Counter 0 def #endif % @sfps % ===== % Setfont on a PS font. % fontdict-name @sfps - /@sfps { % findfont setfont setfont #ifdef DEBUG (@sfps: ) print /Setfont-Counter Setfont-Counter 1 add def Setfont-Counter ( ) cvs print (\n) print flush % vmstatus exch sub == pop % print a few statistics (mem remaining) flush #endif } def