Darren Dale | 25 Sep 16:28

system fonts not found

I noticed this morning that my Times and Palatino system fonts are not being 
found anymore. I removed my fontManager.cache and ran my script with 
verbose=debug, and it looks like creatFontDict found them, but then findfont 
cant:

$ python characteristics_size_plots.py
matplotlib data path /usr/lib64/python2.5/site-packages/matplotlib/mpl-data
loaded rc file /home/darren/.matplotlib/matplotlibrc
matplotlib version 0.98.3
verbose.level debug
interactive is False
units is False
platform is linux2
loaded modules: 
['_bisect', 'numpy.ma.types', 'xml.sax.urlparse', 'distutils', 'matplotlib.errno', 'pylab',
'numpy.core.defchararray', 'xml._xmlplus', 'matplotlib.tempfile', 'distutils.sysconfig',
'ctypes._endian', 'encodings.encodings', 'matplotlib.dateutil', 'matplotlib.colors',
'numpy.core.numerictypes', 'numpy.testing.sys', 'numpy.core.info', 'xml', 'numpy.fft.types',
'numpy.ma.operator', 'distutils.dep_util', 'numpy.ma.cPickle', 'struct', 'numpy.random.info',
'tempfile', 'base64', 'numpy.linalg', 'matplotlib.threading', 'numpy.testing.operator',
'enthought.pyface', 'imp', 'numpy.testing', 'collections', 'numpy.core.umath',
'numpy.lib.pkgutil', 'pytz.os', 'numpy.lib.numpy', 'numpy.core.scalarmath', 'numpy.ma.sys',
'matplotlib.matplotlib', 'string', 'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.a
 rraysetops', 'numpy.testing.unittest', 'numpy.lib.math', 'encodings.utf_8',
'matplotlib.__future__', 'pytz.tzinfo', 'numpy.testing.re', 'itertools', 'numpy.version',
'numpy.lib.re', 'distutils.re', 'ctypes.os', 'numpy.core.os', 'numpy.lib.type_check',
'httplib', 'enthought.traits', 'bisect', 'signal', 'enthought.pyface.ui', 'numpy.lib.types',
'numpy.lib._datasource', 'random', 'numpy.ma.extras', 'numpy.fft.fftpack_lite',
'matplotlib.cbook', 'ctypes.ctypes', 'xml.sax.xmlreader', 'matplotlib.pytz',
'numpy.__builtin__', 'distutils.log', 'xml.sax.saxexts', 'cStringIO', 'numpy.ma.core',
(Continue reading)

John Hunter | 25 Sep 17:53
Gravatar

Re: system fonts not found

On Thu, Sep 25, 2008 at 9:31 AM, Darren Dale <dsdale24@...> wrote:
> I noticed this morning that my Times and Palatino system fonts are not being
> found anymore. I removed my fontManager.cache and ran my script with
> verbose=debug, and it looks like creatFontDict found them, but then findfont
> cant:

I recently fixed another bug related to font finding when an explicit
file name was passed -- I wonder if I broke a normal use case.  It's a
simple change shown in the diff below.  Could you manually revert on
your end and see if it makes a difference.  If so, I'll have to find
another solution to the problem I was fixing.

johnh <at> flag:mpl> svn diff lib/matplotlib/font_manager.py -r6097:6098
Index: lib/matplotlib/font_manager.py
===================================================================
--- lib/matplotlib/font_manager.py      (revision 6097)
+++ lib/matplotlib/font_manager.py      (revision 6098)
@@ -955,7 +955,7 @@
         fname = prop.get_file()
         if fname is not None:
             verbose.report('findfont returning %s'%fname, 'debug')
-            return fname[0]
+            return fname

         if fontext == 'afm':
             fontdict = self.afmdict

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
(Continue reading)

Darren Dale | 25 Sep 18:32

Re: system fonts not found

On Thursday 25 September 2008 11:53:04 am John Hunter wrote:
> On Thu, Sep 25, 2008 at 9:31 AM, Darren Dale <dsdale24@...> wrote:
> > I noticed this morning that my Times and Palatino system fonts are not
> > being found anymore. I removed my fontManager.cache and ran my script
> > with verbose=debug, and it looks like creatFontDict found them, but then
> > findfont cant:
>
> I recently fixed another bug related to font finding when an explicit
> file name was passed -- I wonder if I broke a normal use case.  It's a
> simple change shown in the diff below.  Could you manually revert on
> your end and see if it makes a difference.  If so, I'll have to find
> another solution to the problem I was fixing.
>
>
> johnh <at> flag:mpl> svn diff lib/matplotlib/font_manager.py -r6097:6098
> Index: lib/matplotlib/font_manager.py
> ===================================================================
> --- lib/matplotlib/font_manager.py      (revision 6097)
> +++ lib/matplotlib/font_manager.py      (revision 6098)
> @@ -955,7 +955,7 @@
>          fname = prop.get_file()
>          if fname is not None:
>              verbose.report('findfont returning %s'%fname, 'debug')
> -            return fname[0]
> +            return fname
>
>          if fontext == 'afm':
>              fontdict = self.afmdict

I tried this, but it didnt change anything. I ended up checking the values of 
(Continue reading)

Jae-Joon Lee | 5 Oct 01:56

Re: system fonts not found

John,

As you may know, you're reverting the change Michael made sometime
ago. Michael said it is not a bug, but rather intended.

http://sourceforge.net/mailarchive/message.php?msg_id=6e8d907b0809031201p4bb0701eo23b3d294797a8766%40mail.gmail.com

So, I would appreciate if you reiterate this with Micheal before I
change back my scripts again.

Regards,

-JJ

On Thu, Sep 25, 2008 at 11:53 AM, John Hunter <jdh2358@...> wrote:
> On Thu, Sep 25, 2008 at 9:31 AM, Darren Dale <dsdale24@...> wrote:
>> I noticed this morning that my Times and Palatino system fonts are not being
>> found anymore. I removed my fontManager.cache and ran my script with
>> verbose=debug, and it looks like creatFontDict found them, but then findfont
>> cant:
>
> I recently fixed another bug related to font finding when an explicit
> file name was passed -- I wonder if I broke a normal use case.  It's a
> simple change shown in the diff below.  Could you manually revert on
> your end and see if it makes a difference.  If so, I'll have to find
> another solution to the problem I was fixing.
>
>
> johnh <at> flag:mpl> svn diff lib/matplotlib/font_manager.py -r6097:6098
> Index: lib/matplotlib/font_manager.py
(Continue reading)


Gmane