summaryrefslogtreecommitdiff
path: root/libre/python-reportlab-libre/free-fonts.patch
blob: 9c79839b67cba4699304f065e349324166b2441b (plain)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
diff -rupN reportlab-2.5-orig/setup.py reportlab-2.5/setup.py
--- reportlab-2.5-orig/setup.py	2010-06-16 13:56:53.000000000 +0200
+++ reportlab-2.5/setup.py	2011-01-06 11:01:50.263333455 +0100
@@ -222,11 +222,11 @@ def get_fonts(PACKAGE_DIR, reportlab_fil
         infoline("Standard T1 font curves already downloaded")
         return
     try:
-        infoline("Downloading standard T1 font curves")
+        #infoline("Downloading standard T1 font curves")
 
-        remotehandle = urllib2.urlopen("http://www.reportlab.com/ftp/fonts/pfbfer.zip")
-        zipdata = StringIO.StringIO(remotehandle.read())
-        remotehandle.close()
+        #remotehandle = urllib2.urlopen("http://www.reportlab.com/ftp/fonts/pfbfer.zip")
+        #zipdata = StringIO.StringIO(remotehandle.read())
+        #remotehandle.close()
         archive = zipfile.ZipFile(zipdata)
         dst = pjoin(rl_dir, 'fonts')
 
@@ -239,7 +239,7 @@ def get_fonts(PACKAGE_DIR, reportlab_fil
     except:
         xitmsg = "Failed to download standard T1 font curves"
     reportlab_files = [x for x in reportlab_files if os.path.isfile(pjoin(rl_dir,x))]
-    infoline(xitmsg)
+    #infoline(xitmsg)
 
 def main():
     #test to see if we've a special command
diff -rupN reportlab-2.5-orig/src/reportlab/pdfbase/_fontdata.py reportlab-2.5/src/reportlab/pdfbase/_fontdata.py
--- reportlab-2.5-orig/src/reportlab/pdfbase/_fontdata.py	2010-02-10 22:01:22.000000000 +0100
+++ reportlab-2.5/src/reportlab/pdfbase/_fontdata.py	2011-01-06 11:03:59.459999025 +0100
@@ -72,20 +72,20 @@ _font2fnrMapWin32 = {
                     }
 if sys.platform in ('linux2',):
     _font2fnrMapLinux2 ={
-                'symbol': 'Symbol',
-                'zapfdingbats': 'ZapfDingbats',
-                'helvetica': 'Arial',
-                'helvetica-bold': 'Arial-Bold',
-                'helvetica-boldoblique': 'Arial-BoldItalic',
-                'helvetica-oblique': 'Arial-Italic',
-                'times-bold': 'TimesNewRoman-Bold',
-                'times-bolditalic':'TimesNewRoman-BoldItalic',
-                'times-italic': 'TimesNewRoman-Italic',
-                'times-roman': 'TimesNewRoman',
-                'courier-bold': 'Courier-Bold',
-                'courier-boldoblique': 'Courier-BoldOblique',
-                'courier': 'Courier',
-                'courier-oblique': 'Courier-Oblique',
+                'symbol': 's050000l.pfb',
+                'zapfdingbats': 'd050000l.pfb',
+                'helvetica': 'n019003l.pfb',
+                'helvetica-bold': 'n019004l.pfb',
+                'helvetica-boldoblique': 'n019024l.pfb',
+                'helvetica-oblique': 'n019023l.pfb',
+                'times-bold': 'n021004l.pfb',
+                'times-bolditalic':'n021024l.pfb',
+                'times-italic': 'n021023l.pfb',
+                'times-roman': 'n021003l.pfb',
+                'courier-bold': 'n022004l.pfb',
+                'courier-boldoblique': 'n022024l.pfb',
+                'courier': 'n022003l.pfb',
+                'courier-oblique': 'n022023l.pfb',
                 }
     _font2fnrMap = _font2fnrMapLinux2
     for k, v in _font2fnrMap.items():
diff -rupN reportlab-2.5-orig/src/reportlab/rl_config.py reportlab-2.5/src/reportlab/rl_config.py
--- reportlab-2.5-orig/src/reportlab/rl_config.py	2010-09-30 13:27:09.000000000 +0200
+++ reportlab-2.5/src/reportlab/rl_config.py	2011-01-06 11:01:50.266666714 +0100
@@ -49,25 +49,7 @@ ttfAsciiReadable=           1
 
 # places to look for T1Font information
 T1SearchPath =  (
-                'c:/Program Files/Adobe/Acrobat 9.0/Resource/Font', 
-                'c:/Program Files/Adobe/Acrobat 8.0/Resource/Font', 
-                'c:/Program Files/Adobe/Acrobat 7.0/Resource/Font', 
-                'c:/Program Files/Adobe/Acrobat 6.0/Resource/Font', #Win32, Acrobat 6
-                'c:/Program Files/Adobe/Acrobat 5.0/Resource/Font',     #Win32, Acrobat 5
-                'c:/Program Files/Adobe/Acrobat 4.0/Resource/Font', #Win32, Acrobat 4
-                '%(disk)s/Applications/Python %(sys_version)s/reportlab/fonts', #Mac?
-                '/usr/lib/Acrobat9/Resource/Font',      #Linux, Acrobat 5?
-                '/usr/lib/Acrobat8/Resource/Font',      #Linux, Acrobat 5?
-                '/usr/lib/Acrobat7/Resource/Font',      #Linux, Acrobat 5?
-                '/usr/lib/Acrobat6/Resource/Font',      #Linux, Acrobat 5?
-                '/usr/lib/Acrobat5/Resource/Font',      #Linux, Acrobat 5?
-                '/usr/lib/Acrobat4/Resource/Font',      #Linux, Acrobat 4
-                '/usr/local/Acrobat9/Resource/Font',    #Linux, Acrobat 5?
-                '/usr/local/Acrobat8/Resource/Font',    #Linux, Acrobat 5?
-                '/usr/local/Acrobat7/Resource/Font',    #Linux, Acrobat 5?
-                '/usr/local/Acrobat6/Resource/Font',    #Linux, Acrobat 5?
-                '/usr/local/Acrobat5/Resource/Font',    #Linux, Acrobat 5?
-                '/usr/local/Acrobat4/Resource/Font',    #Linux, Acrobat 4
+                '/usr/share/fonts/Type1',
                 '%(REPORTLAB_DIR)s/fonts',              #special
                 '%(REPORTLAB_DIR)s/../fonts',           #special
                 '%(REPORTLAB_DIR)s/../../fonts',        #special
@@ -76,44 +58,17 @@ T1SearchPath =  (
 
 # places to look for TT Font information
 TTFSearchPath = (
-                'c:/winnt/fonts',
-                'c:/windows/fonts',
-                '/usr/lib/X11/fonts/TrueType/',
-                '/usr/share/fonts/truetype',
+                '/usr/share/fonts/TTF',
                 '%(REPORTLAB_DIR)s/fonts',      #special
                 '%(REPORTLAB_DIR)s/../fonts',   #special
                 '%(REPORTLAB_DIR)s/../../fonts',#special
                 '%(HOME)s/fonts',               #special
-                #mac os X - from
-                #http://developer.apple.com/technotes/tn/tn2024.html
-                '~/Library/Fonts',
-                '/Library/Fonts',
-                '/Network/Library/Fonts',
-                '/System/Library/Fonts',
-                
                 )
 
 # places to look for CMap files - should ideally merge with above
 CMapSearchPath = (
-                  '/usr/lib/Acrobat9/Resource/CMap',
-                  '/usr/lib/Acrobat8/Resource/CMap',
-                  '/usr/lib/Acrobat7/Resource/CMap',
-                  '/usr/lib/Acrobat6/Resource/CMap',
-                  '/usr/lib/Acrobat5/Resource/CMap',
-                  '/usr/lib/Acrobat4/Resource/CMap',
-                  '/usr/local/Acrobat9/Resource/CMap',
-                  '/usr/local/Acrobat8/Resource/CMap',
-                  '/usr/local/Acrobat7/Resource/CMap',
-                  '/usr/local/Acrobat6/Resource/CMap',
-                  '/usr/local/Acrobat5/Resource/CMap',
-                  '/usr/local/Acrobat4/Resource/CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat\\Resource\\CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat 9.0\\Resource\\CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat 8.0\\Resource\\CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat 7.0\\Resource\\CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat 6.0\\Resource\\CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat 5.0\\Resource\\CMap',
-                  'C:\\Program Files\\Adobe\\Acrobat 4.0\\Resource\\CMap',
+                  '/usr/share/ghostscript/8.71/Resource/CMap',
+                  '/usr/share/ghostscript/9.00/Resource/CMap',
                   '%(REPORTLAB_DIR)s/fonts/CMap',       #special
                   '%(REPORTLAB_DIR)s/../fonts/CMap',    #special
                   '%(REPORTLAB_DIR)s/../../fonts/CMap', #special