Skip to content

ci: render with the latest Pango from conda-forge - #20

Merged
AmitMY merged 1 commit into
mainfrom
ci/latest-pango
Oct 8, 2026
Merged

AmitMY merged 1 commit into
mainfrom
ci/latest-pango

Conversation

@AmitMY

@AmitMY AmitMY commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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):

Pango 1.52 (apt) Pango 1.58.2 (conda-forge)
benchmark.py word mix ~123k it/s ~130k it/s (+6%)
long_text_benchmark.py ~1,141 it/s ~1,280 it/s (+12%)

Changes

  • test.yaml: setup-micromamba environment with pango pycairo pygobject from conda-forge (prints the resolved versions), replacing the apt action.
  • Dockerfile: mambaorg/micromamba base with the same conda-forge stack. Verified: builds and prints (16, 48, 3) ✅.
  • Removed the now-unused .github/actions/setup-pango-cairo.
  • Regenerated the regression reference images with the new stack (versions.json: pango 1.58.2, cairo 1.18.6, pygobject 3.58.0).

⚠️ Rendering changes

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-cairo is removed. test.yaml uses mamba-org/setup-micromamba with a pixel env, runs pip/pytest in that shell, and logs resolved rendering package versions. The Dockerfile switches to mambaorg/micromamba with the same conda-forge packages and Python 3.12.

Regression metadata in versions.json is 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.

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
@AmitMY
AmitMY merged commit 9706296 into main Oct 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant