Thanks for this Vlastimil, looks like there is either a subtlety beyond my
font knowledge or a bug here - mdboom, did you have any ideas? Otherwise I
think we need a github issue for this.

Cheers,


On 4 January 2014 19:37, Vlastimil Brom <vlastimil.b...@gmail.com> wrote:

> Hi all,
> after upgrading to matplotlib 1.3.1, I noticed some display errors on
> the plots with regard to accented characters (such as carons etc.).
> As I recall, I had similar problem in the past and could work around
> them by modifying rcParams, however, this fix doesn't work as expected
> in 1.3.1. (with python 2.7.6, 32bit on Win 7, Czech - with both WXAgg
> and TKAgg backends).
> From the usual Czech diacritics   áčďéěíňóřšťúůýž some are not
> displayed  (ďěňřťů) - replacement squares are shown instead.
>
> Simply prepending a suitable font at the beginning of the list
> rcParams['font.sans-serif'] doesn't help in 1.3.1.
> I eventually found out, that "Bitstream Vera Sans" (which is not
> installed on this computer) is somehow offending - as long as this
> item is in the list (even at the end), the mentioned characters aren't
> displayed.
>
> The problem can be observed in the following simple pylab script:
> ==============
> #! Python
> # -*- coding: utf-8 -*-
>
> # with implicit fonts "ďěňřťů" are not displayed properly in the plot title
> from matplotlib import rcParams
> rcParams['font.family'] = 'sans-serif'
> if "Bitstream Vera Sans" in rcParams['font.sans-serif']:
>     rcParams['font.sans-serif'].remove("Bitstream Vera Sans")
>
> # after appending the "offending" font even at the end of the list (by
> uncommenting the following line), ďěňřťů are not displayed again
> # rcParams['font.sans-serif'].append("Bitstream Vera Sans")
>
> import pylab
> pylab.title(u"abcd áčďéěíňóřšťúůýž äöüß ê xyz")
> pylab.show()
> ==============
>
> Is there something special in the resolution of the font items in
>  rcParams?
> This individual issue seems to be fixed with removing the single font,
> but I'd like to understand this more generally, as the installed fonts
> on different computers differ.
>
> Thanks in advance
>               Vlastimil Brom
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to