Mario Oschwald wrote:
> Hello,
> 
> first let me thank you for your excellent software - I think
> it is just wonderful and very pleasant to use.
> 
> Two small things came up when I installed 0.91.1 into
> my home directory (I didn't want to mess with the debian
> packages since they are usually very fast in updating them)
> 
> This passage in the INSTALL file is misleading:
> 
> Note that if you install matplotlib anywhere other than the default
> location, you will need to set the MATPLOTLIBDATA environment
> variable to point to the install base dir.
> 
> 
> Instead of setting MATPLOTLIBDATA to the base dir I specified
> with setup.py install --prefix /home/mo/mpl I had to set
> it to
> 
> /home/mo/mpl/lib/python2.4/site-packages/matplotlib/mpl-data/
> 
> for mathtext to find its fonts.

Was that necessary?  I routinely install matplotlib to a non-standard 
location, and have never set MATPLOTLIBDATA.  If MATPLOTLIBDATA is not 
set, it appears that matplotlib will look for the "mpl-data" directory 
underneath the main matplotlib directory.  (Which in your case is 
/home/mo/mpl/lib/python2.4/site-packages/matplotlib/).  I'm curious if 
you get errors without specifying MATPLOTLIBDATA, and what the error is. 
  Perhaps the INSTALL docs should be updated to clarify that you only 
need this if you install the data in a non-standard place *relative to* 
the source code...

> Secondly this passage in  matplotlib/mathtext.py
> 
>  544         if cached_font is None:
>  545             try:
>  546                 font = FT2Font(basename)
>  547             except RuntimeError:
>  548                 return None

The intent of this code is "if the font isn't found, use a dummy 
character."  Since there are so many different font configurations, and 
they're all a little brittle, I thought it better to warn and fail 
gracefully than to fail completely (and users can always use the "-We" 
to fail on warnings.)  Otherwise, we run the risk of having some plots 
not working on all installations (because of font limitations, etc.)

However, the implementation isn't quite right because not all callers 
expect and deal with the 'None' result correctly.  I have fixed this in 
-r4557.  Can you please send a script that triggers this error, so I can 
ensure my patch corrects for it?

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to