Commit 8d383b8a authored by Jonas Smedegaard's avatar Jonas Smedegaard

Imported Upstream version 9.01~dfsg

parent ef4adfe2
base/Makefile.in
\ No newline at end of file
......@@ -13,17 +13,23 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: DefaultRGB 8022 2007-06-05 22:23:38Z giles $
% $Id: DefaultRGB 11934 2010-12-04 21:12:37Z mvrhel $
% DefaultRGB color space resource.
currentglobal true setglobal
/DefaultRGB
[ /CIEBasedABC
3 dict begin
/WhitePoint [ 0.9505 1.0 1.089 ] def
/DecodeLMN [ { 1.8 exp } bind dup dup ] def
/MatrixLMN [ 0.4439 0.2522 0.0436 0.3341 0.6371 0.1387 0.1725 0.1107 0.9067 ] def
3 dict begin
/DecodeLMN [ {
dup 0.03928 le { 12.92321 div } { 0.055 add 1.055 div 2.4 exp } ifelse
} bind dup dup ] def
/MatrixLMN [
0.4360 0.2225 0.0139
0.3851 0.7169 0.09710
0.1431 0.0606 0.7139
] def
/WhitePoint [0.9642 1.0 0.8249] def
currentdict end
]
/ColorSpace defineresource pop
......
......@@ -13,7 +13,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: Fontmap.GS 8978 2008-08-12 23:44:53Z ray $
% $Id: Fontmap.GS 12083 2011-01-31 11:19:53Z ken $
% Fontmap - standard font catalog for Ghostscript.
% ----------------------------------------------------------------
......
%!
% $Id: cidfmap 11349 2010-06-02 08:37:07Z ken $
%!
% $Id: cidfmap 12083 2011-01-31 11:19:53Z ken $
% This is a sample map file for CIDFont category.
%
......
This diff is collapsed.
......@@ -13,7 +13,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_cff.ps 11488 2010-07-05 23:51:46Z alexcher $
% $Id: gs_cff.ps 11749 2010-10-01 02:58:15Z alexcher $
% Loader for CFF (compressed) fonts, including OpenType CFFs.
% The following are not implemented yet:
% Deleted entries in the Name Index
......@@ -734,7 +734,8 @@ dup % Format 2
/DEBUG CFFDEBUG def % bring the binding closer
/StringCache 1 dict def % Private DICT may be reused.
% Read the header.
systemdict /OLDCFF known {
% Read the header.
/f cff def
/vmajor next def
......@@ -758,6 +759,7 @@ dup % Format 2
/offsets 50 dict def
/queued [] def
/opdict null def % reserve a slot
/fonts [ topdicts {
0 () /SubFileDecode filter /f exch def
40 dict begin
......@@ -817,7 +819,6 @@ dup % Format 2
} ifelse
end
} forall
% Wrap up.
resname mark 0 1 fonts length 1 sub {
......@@ -836,6 +837,27 @@ dup % Format 2
1 index exch definefont
} ifelse
} for .dicttomark
} {
forcecidfont
[ { cff 1024 string readstring not { exit } if } loop ]
.parsecff /fonts exch def
resname
mark fonts {
forceresname { exch pop resname exch } if
dup /CIDFontType known { % This is a CIDFont.
dup /CIDFontName 3 index put
1 index exch /CIDFont defineresource
} { % This is a font.
dup /FontName 3 index put
dup /FontType 2 put
1 index exch
definefont
} ifelse
} forall .dicttomark
} ifelse
end % temporary dict
end % FontSetInit ProcSet
/FontSet defineresource
......
......@@ -13,7 +13,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_fapi.ps 11488 2010-07-05 23:51:46Z alexcher $
% $Id: gs_fapi.ps 12099 2011-02-02 14:12:15Z chrisl $
% Redefine Font and CIDFont categories with FAPI-handeled fonts.
systemdict /.FAPIavailable known { .FAPIavailable } { false } ifelse not {
......@@ -60,18 +60,38 @@ languagelevel 2 .setlanguagelevel
%----------------------------- Process FAPIconfig -----------------------
% The HookDiskFonts and HookEmbeddedFonts take a simple array setting normally.
% but if two or more FAPI plugins are built in, they can take a dictionary,
% whose contents are the FAPI subtype string of a given plugin as the key,
% and an array containing the (sub)set of font types the plugin should handle.
% Any repetition of font types is ill advised since the resulting bevhaviour
% will depend on the order entries are stored in the dictionary, which is
% indeterminate. An attempt to use request a font scaler/renderer which cannot
% deal with a given font type will result in the FAPI resorting to it's default
% search for a viable plugin.
%
% As an example, you might want UFST to handle Truetype/Type 42 fonts, and
% Freetype to handle others, thus:
% /HookDiskFonts << /UFST [11 42] /FreeType [1 2 9] >>
% /HookEmbeddedFonts << /UFST [11 42] /FreeType [1 2 9] >>
/Config
<<
% Setup the default FAPIConfig values to default to FreeType
%
/FontPath (/Fonts) % A default directory for FAPI-handled font files
% path in FAPIfontmap.
/CIDFontPath (/CIDFonts) % A default directory for FAPI-handled CIDfont % files path in FAPIcidfmap.
/HookDiskFonts [1 2 9 11 42] % FontType values for disk PS fonts to be
% redirected to FAPI.
/HookEmbeddedFonts [1 2 9 11 42] % FontType values for embedded PS fonts to be
% redirected to FAPI.
systemdict /FAPIconfig known {/FAPIconfig .systemvar} {(FAPIconfig)} ifelse .runlibfile
% If we've got a FAPIConfig, run it now.
systemdict /FAPIconfig known
{
/FAPIconfig .systemvar .runlibfile
} if
% Now setup defaults for any entries not set above - these defaults are correct
% for FAPI/Freeetype
currentdict /FontPath known not { /FontPath (/Fonts)} if % A default directory for FAPI-handled font files
% path in FAPIfontmap.
currentdict /CIDFontPath known not { /CIDFontPath (/CIDFonts)} if % A default directory for FAPI-handled CIDfont % files path in FAPIcidfmap.
currentdict /HookDiskFonts known not { /HookDiskFonts [1 2 9 11 42] } if % FontType values for disk PS fonts to be
% redirected to FAPI.
currentdict /HookEmbeddedFonts known not { /HookEmbeddedFonts [1 2 9 11 42] } if % FontType values for embedded PS fonts to be
% redirected to FAPI.
/ServerOptions 2 dict
>> def
systemdict /.FAPIconfig //Config put
......@@ -150,7 +170,8 @@ currentdict end def
currentdict end def
/ReadFCOfontmap: % <path> ReadFCOfontmap: name dict ...
{ /fontfile exch def
{
/fontfile exch def
{
currentfile =string readline not {
pop exit
......@@ -194,7 +215,31 @@ currentdict end def
pop pop
} if
/Encoding counttomark 2 add -1 roll
>> % dup { exch //== exec = } forall
/FontInfo
<<
/UnderlineThickness 50
/Weight (Regular)
/version (0.00)
/ItalicAngle 0
/UnderlinePosition -100
/FamilyName ()
/Notice ()
/FullName ()
>>
% although we pretend this is a Type 1, the FAPI interface currently
% needs an identity FontMatrix
/FontMatrix [1.0 0.0 0.0 1.0 0.0 0.0]
% we need a fake CharStrings dictionary to placate certain jobs
% which try to look inside it
/CharStrings
<<
/.notdef ( )
StandardEncoding { ( ) } forall
>>
% FontBBox will get replaced with valid numbers pulled from the rendering engine
/FontBBox [-128 -128 1024 1024] cvx
>> % dup { exch == = } forall
} ifelse
} {
pop
......@@ -304,7 +349,23 @@ bind def
} ifelse
{ /HookDiskFonts } { /HookEmbeddedFonts } ifelse
//Config exch get % name <<font>> [types]
1 index //GetFontType exec //FindInArray exec % name <<font>> bHook
dup type /dicttype eq
{
false exch
{
3 index //GetFontType exec //FindInArray exec
{
2 index exch /FAPIPlugInReq exch put
pop true exit
}
{ pop } ifelse
} forall
}
{
1 index //GetFontType exec //FindInArray exec % name <<font>> bHook
} ifelse
{ { (Trying to render the font ) print //PrintFontRef exec ( with FAPI...) = } //FAPI_hook_debug exec
//.FAPIpassfont {
{ //PrintFontRef exec ( is being rendered with FAPI=) print dup /FAPI get = } //FAPI_hook_debug exec
......@@ -315,6 +376,9 @@ bind def
} {
{ (The font ) print //PrintFontRef exec ( doesn't need to render with FAPI.) = } //FAPI_hook_debug exec
} ifelse
% Remove the plugin request from the font dictionary
dup /FAPIPlugInReq undef
} ifelse
} bind def
......@@ -329,7 +393,7 @@ bind def
% ------------------ Redefine .buildfont* with FAPI : -----------------------
/.buildfont1
{ //.buildfont1 exec //FAPIhook exec
{ //.buildfont1 exec exec //FAPIhook exec
} bind % 'odef' is below.
/.buildfont2
......
......@@ -13,7 +13,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_fntem.ps 11215 2010-05-11 09:35:16Z ken $
% $Id: gs_fntem.ps 12099 2011-02-02 14:12:15Z chrisl $
% A procset for Postscript font emulation
% The procedures must not depend on the presence of the
......@@ -63,10 +63,14 @@ systemdict exch /.xlatmap exch put
/TypeKey /FontType def
1
{ /FontMatrix [0.001 0 0 0.001 0 0] def
/FontBBox [-128 -128 1024 1024] def % zfapi.ps refines it.
{
currentdict /FontMatrix known not { /FontMatrix [0.001 0 0 0.001 0 0] def } if
currentdict /FontBBox known not { /FontBBox [-128 -128 1024 1024] cvx def } if % zfapi.ps refines it.
/Private 0 dict def
/CharStrings << /.notdef () >> def
% if we're using the FAPI/UFST code for Microtype fonts,
% then we've already created a "fake" CharStrings, so don't replace it.
% See gs_fapi.ps
currentdict /CharStrings known not {/CharStrings << /.notdef () >> def} if
//FontCommon exec
} bind def
......@@ -318,10 +322,15 @@ currentdict end def
} {
dup //encodingnames
exch .knownget {
exch pop
/Decoding findresource 1 index exch /Decoding exch put
} {
% unknown encoding, convert it to decoding :
{ /Decoding findresource } stopped {pop pop true}{ exch pop 1 index exch /Decoding exch put false } ifelse
}
{
true
} ifelse
{
% unknown encoding, or an encoding for which we don't have a
% predefined decoding, convert it to decoding :
dup length dict begin
/.notdef 0 def
0 1 currentdict length 1 sub
......@@ -335,7 +344,7 @@ currentdict end def
pop
currentdict end
1 index exch /Decoding exch put
} ifelse
} if
} ifelse
exit
} loop
......
......@@ -13,7 +13,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_init.ps 11721 2010-09-14 14:56:26Z chrisl $
% $Id: gs_init.ps 11716 2010-09-14 07:49:11Z chrisl $
% Initialization file for the interpreter.
% When this is run, systemdict is still writable.
......@@ -30,7 +30,7 @@
% Interpreter library version number
% NOTE: the interpreter code requires that the first non-comment token
% in this file be an integer, and that it match the compiled-in version!
900
901
% Check the interpreter revision.
dup revision ne
......
......@@ -13,7 +13,7 @@
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_lev2.ps 11574 2010-07-30 17:15:23Z mvrhel $
% $Id: gs_lev2.ps 11924 2010-11-29 18:55:03Z mvrhel $
% Initialization file for Level 2 functions.
% When this is run, systemdict is still writable,
% but (almost) everything defined here goes into level2dict.
......@@ -639,26 +639,33 @@ currentuserparams /WaitTimeout known
% defined by ICC profiles
//systemdict /ICCProfilesDir .knownget {
% Set the directory sepcified by the command line option
mark exch /ICCProfilesDir exch .dicttomark .setuserparams
} {
% Search for valid (iccprofiles) directory as a sibling to (Resource)
% and set it as a default if found.
LIBPATH {
(Resource) search {
exch pop exch pop (iccprofiles) concatstrings
.file_name_separator concatstrings
dup (default_gray.icc) concatstrings status {
pop pop pop pop
mark exch /ICCProfilesDir exch .dicttomark .setuserparams
exit
% First see if the current value is valid so we don't have to guess
mark .currentuserparams .dicttomark /ICCProfilesDir get
(default_gray.icc) concatstrings status {
pop pop pop pop % current value was OK. Just clean up stack
} {
% Search for valid (iccprofiles) directory as a sibling to (Resource)
% and set it as a default if found.
LIBPATH {
(Resource) search {
exch pop exch pop (iccprofiles) concatstrings
.file_name_separator concatstrings
dup (default_gray.icc) concatstrings status {
pop pop pop pop
mark exch /ICCProfilesDir exch .dicttomark .setuserparams
exit
} {
pop
} ifelse
} {
pop
} ifelse
} {
pop
} ifelse
} forall
} ifelse
} forall
} ifelse % if currentuserparams ICCProfilesDir
} ifelse % ICCProfilesDir set in systemdict (command line option)
//systemdict /DefaultRGBProfile .knownget{
mark exch /DefaultRGBProfile exch .dicttomark
......
% Copyright (C) 1999, 2000 Aladdin Enterprises. All rights reserved.
%
% This software is provided AS-IS with no warranty, either express or
% implied.
%
% This software is distributed under license and may not be copied,
% modified or distributed except as expressly authorized under the terms
% of the license contained in the file LICENSE in this distribution.
%
% For more information about licensing, please refer to
% http://www.ghostscript.com/licensing/. For information on
% commercial licensing, go to http://www.artifex.com/licensing/ or
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_mgl_e.ps 8954 2008-08-08 04:22:38Z ray $
% Define the Macintosh standard glyph encoding vector.
% This is not an Encoding strictly speaking, but we treat it like one.
/currentglobal where
{ pop currentglobal { setglobal } true setglobal }
{ { } }
ifelse
/MacRomanEncoding .findencoding
/MacGlyphEncoding
/.notdef /.null /CR
% 3
4 index 32 95 getinterval aload pop
% 98
99 index 128 45 getinterval aload pop
% 143
/notequal /AE
/Oslash /infinity /plusminus /lessequal /greaterequal
/yen /mu1 /partialdiff /summation /product
/pi /integral /ordfeminine /ordmasculine /Ohm
/ae /oslash /questiondown /exclamdown /logicalnot
/radical /florin /approxequal /increment /guillemotleft
/guillemotright /ellipsis /nbspace
% 173
174 index 203 12 getinterval aload pop
/lozenge
% 186
187 index 216 24 getinterval aload pop
/applelogo
% 211
212 index 241 7 getinterval aload pop
/overscore
% 219
220 index 249 7 getinterval aload pop
% 226
/Lslash /lslash /Scaron /scaron
/Zcaron /zcaron /brokenbar /Eth /eth
/Yacute /yacute /Thorn /thorn /minus
/multiply /onesuperior /twosuperior /threesuperior /onehalf
/onequarter /threequarters /franc /Gbreve /gbreve
% The TrueType documentation says the next glyph is named
% Idot, but the Adobe standard name for this glyph is
% Idotaccent.
/Idotaccent /Scedilla /scedilla /Cacute /cacute
/Ccaron /ccaron /dmacron
260 -1 roll pop % delete MacRomanEncoding
258 packedarray
7 1 index .registerencoding
.defineencoding
exec
% Copyright (C) 1999, 2000 Aladdin Enterprises. All rights reserved.
%
% This software is provided AS-IS with no warranty, either express or
% implied.
%
% This software is distributed under license and may not be copied,
% modified or distributed except as expressly authorized under the terms
% of the license contained in the file LICENSE in this distribution.
%
% For more information about licensing, please refer to
% http://www.ghostscript.com/licensing/. For information on
% commercial licensing, go to http://www.artifex.com/licensing/ or
% contact Artifex Software, Inc., 101 Lucas Valley Road #110,
% San Rafael, CA 94903, U.S.A., +1(415)492-9861.
% $Id: gs_mgl_e.ps 8954 2008-08-08 04:22:38Z ray $
% Define the Macintosh standard glyph encoding vector.
% This is not an Encoding strictly speaking, but we treat it like one.
/currentglobal where
{ pop currentglobal { setglobal } true setglobal }
{ { } }
ifelse
/MacRomanEncoding .findencoding
/MacGlyphEncoding
/.notdef /.null /CR
% 3
4 index 32 95 getinterval aload pop
% 98
99 index 128 45 getinterval aload pop
% 143
/notequal /AE
/Oslash /infinity /plusminus /lessequal /greaterequal
/yen /mu1 /partialdiff /summation /product
/pi /integral /ordfeminine /ordmasculine /Ohm
/ae /oslash /questiondown /exclamdown /logicalnot
/radical /florin /approxequal /increment /guillemotleft
/guillemotright /ellipsis /nbspace
% 173
174 index 203 12 getinterval aload pop
/lozenge
% 186
187 index 216 24 getinterval aload pop
/applelogo
% 211
212 index 241 7 getinterval aload pop
/overscore
% 219
220 index 249 7 getinterval aload pop
% 226
/Lslash /lslash /Scaron /scaron
/Zcaron /zcaron /brokenbar /Eth /eth
/Yacute /yacute /Thorn /thorn /minus
/multiply /onesuperior /twosuperior /threesuperior /onehalf
/onequarter /threequarters /franc /Gbreve /gbreve
% The TrueType documentation says the next glyph is named
% Idot, but the Adobe standard name for this glyph is
% Idotaccent.
/Idotaccent /Scedilla /scedilla /Cacute /cacute
/Ccaron /ccaron /dmacron
260 -1 roll pop % delete MacRomanEncoding