You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: IBM unix system services - Fonts can'be read in - no labelling is possible #32514
/usr/local/pip/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf In FT2Font: Can not load face (unknown file format; error code 0x2)
Matplotlib backend: agg
Selected font: /usr/local/pip/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf
Font exists: True
Traceback (most recent call last):
File "/u/sri/tlh_analyse_try/test_matplotlib_uss.py", line 23, in
File "/usr/local/pip/matplotlib/pyplot.py", line 1134, in savefig
res = fig.savefig(*args, **kwargs) # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/figure.py", line 3390, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/usr/local/pip/matplotlib/backend_bases.py", line 2193, in print_figure
result = print_method(
^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/backend_bases.py", line 2043, in
print_method = functools.wraps(meth)(lambda *args, **kwargs: meth(
^^^^^
File "/usr/local/pip/matplotlib/backends/backend_agg.py", line 497, in print_png
self._print_pil(filename_or_obj, "png", pil_kwargs, metadata)
File "/usr/local/pip/matplotlib/backends/backend_agg.py", line 445, in _print_pil
FigureCanvasAgg.draw(self)
File "/usr/local/pip/matplotlib/backends/backend_agg.py", line 388, in draw
self.figure.draw(self.renderer)
File "/usr/local/pip/matplotlib/artist.py", line 95, in draw_wrapper
result = draw(artist, renderer, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/artist.py", line 72, in draw_wrapper
return draw(artist, renderer)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/figure.py", line 3154, in draw
mimage._draw_list_compositing_images(
File "/usr/local/pip/matplotlib/image.py", line 132, in _draw_list_compositing_images
a.draw(renderer)
File "/usr/local/pip/matplotlib/artist.py", line 72, in draw_wrapper
return draw(artist, renderer)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/axes/_base.py", line 3034, in draw
self._update_title_position(renderer)
File "/usr/local/pip/matplotlib/axes/_base.py", line 2978, in _update_title_position
ax.yaxis.get_tightbbox(renderer) # update offsetText
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/axis.py", line 1336, in get_tightbbox
self._update_label_position(renderer)
File "/usr/local/pip/matplotlib/axis.py", line 2609, in _update_label_position
bboxes, bboxes2 = self._get_tick_boxes_siblings(renderer=renderer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/axis.py", line 2161, in _get_tick_boxes_siblings
tlb, tlb2 = axis._get_ticklabel_bboxes(ticks_to_draw, renderer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/axis.py", line 1315, in _get_ticklabel_bboxes
return ([tick.label1.get_window_extent(renderer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/text.py", line 956, in get_window_extent
bbox, info, descent = self._get_layout(self._renderer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/text.py", line 373, in _get_layout
_, lp_h, lp_d = _get_text_metrics_with_cache(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/text.py", line 69, in _get_text_metrics_with_cache
return _get_text_metrics_with_cache_impl(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/text.py", line 77, in _get_text_metrics_with_cache_impl
return renderer_ref().get_text_width_height_descent(text, fontprop, ismath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/backends/backend_agg.py", line 220, in get_text_width_height_descent
font = self._prepare_font(prop)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/backends/backend_agg.py", line 254, in _prepare_font
font = get_font(_fontManager._find_fonts_by_props(font_prop))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/pip/matplotlib/font_manager.py", line 1554, in get_font
return _get_font(
^^^^^^^^^^
File "/usr/local/pip/matplotlib/font_manager.py", line 1496, in _get_font
return ft2font.FT2Font(
^^^^^^^^^^^^^^^^
RuntimeError: In FT2Font: Can not load face (unknown file format; error code 0x2)
Expected outcome
should label the plot
Additional information
I created a smoke-test after it did not work in a larger environment that works in ubuntu, but not under USS (z/OS)
Can you reproduce this with matplotlib 3.11? There’s been substantial changes to font handling, and we won’t do any fix es to an ancient matplotlib verse.
Activity
timhoffm commentedon Oct 21, 2026
Can you reproduce this with matplotlib 3.11? There’s been substantial changes to font handling, and we won’t do any fix es to an ancient matplotlib verse.