Revision: 6905
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6905&view=rev
Author: jouni
Date: 2009-02-12 18:00:55 +0000 (Thu, 12 Feb 2009)
Log Message:
-----------
Small fixes to test_pdf_use14corefonts.py, thanks to Nicolas Grilly
Modified Paths:
--------------
trunk/matplotlib/unit/test_pdf_use14corefonts.py
Modified: trunk/matplotlib/unit/test_pdf_use14corefonts.py
===================================================================
--- trunk/matplotlib/unit/test_pdf_use14corefonts.py 2009-02-10 22:16:35 UTC
(rev 6904)
+++ trunk/matplotlib/unit/test_pdf_use14corefonts.py 2009-02-12 18:00:55 UTC
(rev 6905)
@@ -1,16 +1,31 @@
-# encoding: utf-8
+# -*- encoding: utf-8 -*-
+"""
+Test the PDF backend with the option use14corefonts=True.
-import matplotlib
-matplotlib.use('PDF')
+Font cache issue
+----------------
+The font cache doesn't record whether it was build with
+pdf.use14corefonts enabled or not, and the font name "Helvetica"
+happens to match "Helvetica Narrow", whose metrics are included with
+matplotlib, and using that AFM file without including the font itself
+breaks the output.
+
+As a workaround, please reset the font cache by deleting
+~/.matplotlib/fontList.cache each time you enable or disable
+use14corefonts.
+"""
+
from matplotlib import rcParams
-import pylab
+rcParams['backend'] = 'pdf'
rcParams['pdf.use14corefonts'] = True
rcParams['font.family'] = 'sans-serif'
rcParams['font.size'] = 8
rcParams['font.sans-serif'] = ['Helvetica']
+import pylab
+
title = u'Test PDF backend with option use14corefonts=True'
text = u'''A three-line text positioned just above a blue line
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins