Skip to content

Commit 38c1c0b

Browse files
committed
releasing 0.73
svn path=/trunk/matplotlib/; revision=1085
1 parent 6388198 commit 38c1c0b

File tree

6 files changed

+25
-5
lines changed

6 files changed

+25
-5
lines changed

MANIFEST

+1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ examples/data/ct.raw
384384
examples/data/eeg.dat
385385
examples/data/embedding_in_wx3.xrc
386386
examples/data/intc.csv
387+
examples/data/lena.jpg
387388
examples/data/membrane.dat
388389
examples/data/msft.csv
389390
examples/data/s1045.ima

TODO

+3-1
Original file line numberDiff line numberDiff line change
@@ -671,4 +671,6 @@ ZeroDivisionError: SeparableTransformation::eval_scalars yin interval is zero; c
671671

672672
-- colorbar image origin with contour is broken in SVG; test PS
673673

674-
-- Bryan Cole's CXX type segfault
674+
-- Bryan Cole's CXX type segfault
675+
676+
-- japanese ft2font bug

lib/matplotlib/font_manager.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ def findSystemFonts(fontpaths=None, fontext='ttf'):
179179
elif isinstance(fontpaths, (str, unicode)):
180180
fontpaths = [fontpaths]
181181
for path in fontpaths:
182-
for fname in glob.glob(os.path.join(path, '*.'+fontext)):
182+
files = glob.glob(os.path.join(path, '*.'+fontext))
183+
files.extend(glob.glob(os.path.join(path, '*.'+fontext.upper())))
184+
for fname in files:
183185

184186
fontfiles[os.path.abspath(fname)] = 1
185187
return [fname for fname in fontfiles.keys() if os.path.exists(fname)]
@@ -767,6 +769,7 @@ def __init__(self, size=12.0, weight='normal'):
767769

768770
self.ttffiles = findSystemFonts(paths) + findSystemFonts()
769771
for fname in self.ttffiles:
772+
verbose.report('trying fontname %s' % fname, 'debug')
770773
if fname.lower().find('vera.ttf')>=0:
771774
self.defaultFont = fname
772775
break

lib/matplotlib/legend.py

+1
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ def get_tbounds(text): #get text bounds in axes coords
349349

350350
# Set the data for the legend patch
351351
bbox = self._get_handle_text_bbox(renderer).deepcopy()
352+
352353
bbox.scale(1 + self.pad, 1 + self.pad)
353354
l,b,w,h = bbox.get_bounds()
354355
self.legendPatch.set_bounds(l,b,w,h)

src/_backend_agg.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1161,10 +1161,10 @@ RendererAgg::_draw_markers(const Py::Tuple& args) {
11611161
while(!agg::is_stop(cmd = ppath->vertex(&x, &y)))
11621162
markers.add_vertex(x+thisx, thisy-y, cmd);
11631163

1164-
1164+
_fill_and_stroke(markers, gc, face, curvy);
11651165
} //for each marker
11661166

1167-
_fill_and_stroke(markers, gc, face, curvy);
1167+
11681168
Py_XDECREF(xa);
11691169
Py_XDECREF(ya);
11701170

src/ft2font.cpp

+14-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,20 @@ FT2Font::FT2Font(std::string facefile)
351351

352352
setattr("postscript_name", Py::String(ps_name));
353353
setattr("num_faces", Py::Int(face->num_faces));
354-
setattr("family_name", Py::String(face->family_name));
354+
355+
std::cout << "trying to set string " << facefile << std::endl;
356+
try {
357+
Py::String s(face->family_name, "utf-16", NULL);
358+
}
359+
catch (...) { //todo; catch specific exception and figure out unicode
360+
std::cout << "oops, exception" << std::endl;
361+
std::ostringstream s;
362+
s << "Could not access facename for facefile " << facefile << " may be unicode limitation" << std::endl;
363+
throw Py::RuntimeError(s.str());
364+
}
365+
std::cout << "done trying to set string" << std::endl;
366+
367+
setattr("family_name", Py::String(face->family_name);
355368
setattr("style_name", Py::String(face->style_name));
356369
setattr("face_flags", Py::Int(face->face_flags));
357370
setattr("style_flags", Py::Int(face->style_flags));

0 commit comments

Comments
 (0)