Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 17a074e

Browse files
committed
Various minor bugfixes.
svn path=/trunk/matplotlib/; revision=3633
1 parent 1a135b7 commit 17a074e

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

lib/matplotlib/_mathtext_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@
22142214
'combiningbreve' : 774,
22152215
'combiningoverline' : 772,
22162216
'combininggraveaccent' : 768,
2217-
'combiningacuteaccent' : 764,
2217+
'combiningacuteaccent' : 714,
22182218
'combiningdiaeresis' : 776,
22192219
'combiningtilde' : 771,
22202220
'combiningrightarrowabove' : 8407,

lib/matplotlib/mathtext.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ def get_sized_alternatives_for_symbol(self, fontname, sym):
617617
return alternatives
618618
return [(fontname, sym)]
619619

620-
class UnicodeFonts(BakomaFonts):
620+
class UnicodeFonts(TruetypeFonts):
621621
"""An abstract base class for handling Unicode fonts.
622622
"""
623623
fontmap = { 'cal' : 'cmsy10',
@@ -628,7 +628,7 @@ class UnicodeFonts(BakomaFonts):
628628
'sf' : 'DejaVuSans',
629629
None : 'DejaVuSerif-Italic'
630630
}
631-
631+
632632
def _get_offset(self, cached_font, glyph, fontsize, dpi):
633633
return 0.
634634

@@ -637,6 +637,7 @@ def _get_glyph(self, fontname, sym, fontsize):
637637

638638
try:
639639
uniindex = get_unicode_index(sym)
640+
found_symbol = True
640641
except ValueError:
641642
# This is a total hack, but it works for now
642643
if sym.startswith('\\big'):
@@ -658,7 +659,7 @@ def _get_glyph(self, fontname, sym, fontsize):
658659
glyphindex = cached_font.charmap[uniindex]
659660
except KeyError:
660661
warn("Font '%s' does not have a glyph for '%s'" %
661-
(cached_font.postscript_name, sym),
662+
(cached_font.font.postscript_name, sym),
662663
MathTextWarning)
663664
found_symbol = False
664665

@@ -2228,7 +2229,7 @@ def __call__(self, s, dpi, prop, angle=0):
22282229
font_output = BakomaFonts(prop, backend)
22292230
# When we have a decent Unicode font, we should test and
22302231
# then make this available as an option
2231-
# font_output = UnicodeFonts(prop, backend)
2232+
#~ font_output = UnicodeFonts(prop, backend)
22322233

22332234
fontsize = prop.get_size_in_points()
22342235
if self._parser is None:

0 commit comments

Comments
 (0)