|
From: <md...@us...> - 2007-07-17 12:41:02
|
Revision: 3549
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=3549&view=rev
Author: mdboom
Date: 2007-07-17 05:40:56 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
Add support for bf (bold) and sf (sans serif) math fonts.
Modified Paths:
--------------
branches/mathtext_mgd/lib/matplotlib/mathtext.py
Added Paths:
-----------
branches/mathtext_mgd/lib/matplotlib/mpl-data/fonts/ttf/cmb10.ttf
branches/mathtext_mgd/lib/matplotlib/mpl-data/fonts/ttf/cmss10.ttf
Modified: branches/mathtext_mgd/lib/matplotlib/mathtext.py
===================================================================
--- branches/mathtext_mgd/lib/matplotlib/mathtext.py 2007-07-17 12:21:59 UTC (rev 3548)
+++ branches/mathtext_mgd/lib/matplotlib/mathtext.py 2007-07-17 12:40:56 UTC (rev 3549)
@@ -475,6 +475,8 @@
'rm' : 'cmr10.ttf',
'tt' : 'cmtt10.ttf',
'it' : 'cmmi10.ttf',
+ 'bf' : 'cmb10.ttf',
+ 'sf' : 'cmss10.ttf',
None : 'cmmi10.ttf',
}
@@ -547,7 +549,7 @@
Use the Bakoma true type fonts for rendering
"""
fnames = ('cmmi10', 'cmsy10', 'cmex10',
- 'cmtt10', 'cmr10')
+ 'cmtt10', 'cmr10', 'cmb10', 'cmss10')
# allocate a new set of fonts
basepath = os.path.join( get_data_path(), 'fonts', 'ttf' )
@@ -555,6 +557,8 @@
'rm' : 'cmr10',
'tt' : 'cmtt10',
'it' : 'cmmi10',
+ 'bf' : 'cmb10',
+ 'sf' : 'cmss10',
None : 'cmmi10',
}
@@ -694,7 +698,7 @@
Use the Bakoma postscript fonts for rendering to backend_ps
"""
facenames = ('cmmi10', 'cmsy10', 'cmex10',
- 'cmtt10', 'cmr10')
+ 'cmtt10', 'cmr10', 'cmb10', 'cmss10')
# allocate a new set of fonts
basepath = os.path.join( get_data_path(), 'fonts', 'ttf' )
@@ -702,6 +706,8 @@
'rm' : 'cmr10',
'tt' : 'cmtt10',
'it' : 'cmmi10',
+ 'bf' : 'cmb10',
+ 'sf' : 'cmss10',
None : 'cmmi10',
}
@@ -1566,9 +1572,8 @@
| times
| div)
-fontname = oneOf("rm cal it tt")
- # mathbf and mathsf not supported yet
-latex2efont = oneOf("mathrm mathcal mathit mathtt")
+fontname = oneOf("rm cal it tt sf bf")
+latex2efont = oneOf("mathrm mathcal mathit mathtt mathsf mathbf")
texsym = Combine(bslash + Word(alphanums) + NotAny("{"))
@@ -1668,6 +1673,8 @@
| subsuper
).setParseAction(handler.expression).setName("expression")
+
+
####
Added: branches/mathtext_mgd/lib/matplotlib/mpl-data/fonts/ttf/cmb10.ttf
===================================================================
(Binary files differ)
Property changes on: branches/mathtext_mgd/lib/matplotlib/mpl-data/fonts/ttf/cmb10.ttf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/mathtext_mgd/lib/matplotlib/mpl-data/fonts/ttf/cmss10.ttf
===================================================================
(Binary files differ)
Property changes on: branches/mathtext_mgd/lib/matplotlib/mpl-data/fonts/ttf/cmss10.ttf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|