Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ jobs:
fi
) &&
PYTHONFAULTHANDLER=1 PYTHONIOENCODING=utf-8 ./run-examples.py
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*.whl
if: ${{ always() }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: result_images-${{ matrix.os }}-py${{ matrix.python-version }}
path: result_images/
Expand All @@ -87,7 +87,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/upload-artifact/merge@v4
- uses: actions/upload-artifact/merge@v7
with:
name: wheels
pattern: wheel-*
Expand Down
10 changes: 7 additions & 3 deletions ext/_mplcairo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,9 +1477,13 @@ void GraphicsContextRenderer::draw_text(
// because the symbol may have been synthesized by
// FT2Font::get_glyph_name for a font without FT_FACE_FLAG_GLYPH_NAMES
// (e.g. arial.ttf), which FT_Get_Name_Index can't know about.
auto const& [font, size, codepoint, ox, oy] =
spec.cast<
std::tuple<py::object, double, unsigned long, double, double>>();
// Support both pre and post Matplotlib 3.11 formats.
auto const& glyph = spec.cast<py::tuple>();
auto const& font = glyph[0].cast<py::object>();
auto const& size = glyph[1].cast<double>();
auto const& codepoint = glyph[2].cast<uint32_t>();
auto const& ox = glyph[glyph.size() - 2].cast<double>(),
& oy = glyph[glyph.size() - 1].cast<double>();
mb.add_glyph(ox, -oy,
font.attr("fname").cast<std::string>(), size,
codepoint);
Expand Down
Loading