Repository navigation
ci: render with the latest Pango from conda-forge - #20
Merged
Merged
Conversation
Ubuntu 24.04's apt packages pin CI to Pango 1.52.1 / cairo 1.18.0. Test and build the Docker image against conda-forge instead, which ships the latest Pango (1.58.2), cairo (1.18.6), HarfBuzz and PyGObject, and picks up new releases without workflow changes. The newer stack renders ~12% faster on long text (~6% on short words). Regenerate the regression reference images with the new stack (see versions.json). Glyph antialiasing changed subtly across most images; Tibetan shaping changed widths. The apt-based setup-pango-cairo action is no longer used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fy1wuWdqcKuebgj3St8dME
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI (and the Docker image) installed Pango from Ubuntu 24.04 apt, which pins Pango 1.52.1 / cairo 1.18.0. conda-forge ships the latest stack, Pango 1.58.2 / cairo 1.18.6 / HarfBuzz 14.6 / PyGObject 3.58, and updates automatically. That's the same route the README already recommends.
Same code, same machine (aarch64):
benchmark.pyword mixlong_text_benchmark.pyChanges
test.yaml:setup-micromambaenvironment withpango pycairo pygobjectfrom conda-forge (prints the resolved versions), replacing the apt action.Dockerfile:mambaorg/micromambabase with the same conda-forge stack. Verified: builds and prints(16, 48, 3) ✅..github/actions/setup-pango-cairo.versions.json: pango 1.58.2, cairo 1.18.6, pygobject 3.58.0).Renders are not pixel-identical to Pango 1.52. 203 of 205 reference images keep their size, with changes in ~30% of pixels (median), mostly subtle glyph antialiasing and hinting differences. Two Tibetan images (
bod_Tibt,dzo_Tibt) became ~12% narrower because shaping changed. Models trained on 1.52 renders will see slightly different inputs.Full suite passes in the new environment (458), including the pixel-exact regression tests.
Next
The remaining big cost inside Pango is break analysis, which a single line that never wraps doesn't need. I've prepared an upstream Pango patch that skips it lazily (+18% on long text, identical output). Once a Pango release includes it, CI and Docker pick it up through conda-forge with no changes here.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Fy1wuWdqcKuebgj3St8dME
Note
Medium Risk
Changes the native rendering toolchain and regression baselines, so rendered pixels can differ from prior CI/Docker builds and affect downstream models trained on old renders.
Overview
CI and Docker now install Pango, cairo, and PyGObject from conda-forge instead of Ubuntu apt, aligning with the README and pulling newer stack versions (e.g. Pango 1.58.2).
The composite action
.github/actions/setup-pango-cairois removed.test.yamlusesmamba-org/setup-micromambawith apixelenv, runspip/pytestin that shell, and logs resolved rendering package versions. TheDockerfileswitches tomambaorg/micromambawith the same conda-forge packages and Python 3.12.Regression metadata in
versions.jsonis bumped to match the new stack; reference images were regenerated, so outputs are not pixel-identical to the old apt-based Pango 1.52 baseline (notably some Tibetan width/shaping differences).Reviewed by Cursor Bugbot for commit 92807ae. Bugbot is set up for automated code reviews on this repo. Configure here.