Repository navigation
Releases
Releases · BalconyJH/takumi-py
v0.4.0
Immutable
release. Only release title and notes can be modified.
Added
- Add
FontResource.unicode_rangeso each subset of a family registers under one
nameand serves only the codepoints its@font-facedeclares. - Add
Renderer.unregister_fontandRenderer.clear_fontsto release registered
fonts. - Add a budgeted font cache, Takumi's
cacheFont/cachedFonts:
Renderer.cache_font(font, key)registers a font the renderer may release,
Renderer.cached_fonts(key)reports whether it still holds one, and
Renderer(font_cache_max_bytes=...)releases the least recently used cached
families past the budget. Renders mark the families infont_familiesused, and
fonts fromregister_fontare never released. - Decode
data:URI images through the renderer's resource cache, so repeated
renders that inline the same image decode it once. - Add a Takumi 2.17 migration guide, and document font subsets, font release,
animation frame-rate limits, and the Takumi submodule upgrade procedure. - Deploy the documentation on
mainas adevversion in both languages, listed
above the releases in the version selector, through the newPreview · Docs
workflow;lateststays on the newest release. - Add
make changelog, which dates the[Unreleased]notes as the project version
and appends the release's commits, grouped by type and linked by hash, with
@-mentions of its contributors, generated with git-changelog. - Publish the documentation in Simplified Chinese alongside the American English
primary, with a one-click language toggle in the header that keeps the version,
page, and anchor, a Chinese README, and a docs build check that keeps both
languages' pages, anchors, code samples, and configuration in sync. - Add
make release VERSION=x.y.z, which sets the version inpyproject.toml,
Cargo.toml, and both lock files, writes the changelog entry, and checks the
release contract. - Release alphas, betas, and release candidates, such as
0.4.0rc1(0.4.0-rc.1in
Cargo.toml): they publish as GitHub prereleases, and their documentation never
takeslatest. - Publish wheels for four more platforms: musllinux_1_2 x86_64 and aarch64, for
Alpine and other musl-based Linux, macOS on Intel, and Windows on arm64. These
platforms no longer build from the source distribution. - Smoke-test the
cp311-abi3wheel on Python 3.15. - Publish project links, classifiers, and keywords on PyPI.
- Document the versioning and deprecation policy in the support matrix. Deprecation
warnings now name the release that removes the API:FontResource.subset_ofand
dithering="floyd-steinberg"go in 0.6.0. - Add
SECURITY.md, which asks for vulnerability reports through GitHub's private
vulnerability reporting. - Have Dependabot propose weekly uv and Cargo updates alongside GitHub Actions, with
separate pull requests for the exactly pinned ty and Zensical. - Show a banner on every documentation version but the latest release: the
dev
preview says it comes frommainand can describe unreleased changes, and older
releases and prereleases link to the latest one.
Changed
- Clarify that compiled HTML bundles currently return no stylesheets, and describe
render options, resources, keyframes, and result types in the generated API
reference. - Update Takumi from 2.5.4 to 2.17.1, including
takumi-core0.32.0,
takumi-raster0.5.9,takumi-svg0.3.31, andtakumi-html0.6.0. Layout,
text, filters, backgrounds, decorations, and paint order now follow Chrome more
closely; see the upstream changelog for the rendering changes. - Update PyO3 from 0.28 to 0.30 and refresh compatible Rust dependencies.
- Declare
rust-version = "1.91"so dependency resolution stays within the
pinned CI toolchain. - The renderer resource cache now defaults to 64 MiB, up from 16 MiB.
- Publish each version's
CHANGELOG.mdsection as its GitHub Release notes, instead of
GitHub's generated notes. Release · TagandRelease · Publishshare one release-contract check, which now
also requires the commit listmake changeloggenerates.- Refresh the toolchain to Zensical 0.0.72, ty 0.0.91, Ruff 0.17, mypy 2.4, and
maturin 1.15, with current Prek hooks. ty and Zensical, still at 0.0.x, are pinned
exactly so that each upgrade is deliberate, and the commit message hook now
acceptschoreandtypingcommits. - Name the GitHub Actions workflows by stage:
Check · Build and test,Check · Docs,
Check · Lint,Release · Tag, andRelease · Publish, with verb-first job names.
Workflow file names, and so the PyPI Trusted Publisher binding, are unchanged. - Stream
render_animationframes straight into the encoder, so an animation holds
one raw frame at a time instead of all of them. - Split the native extension into focused modules and pass resolved options, fonts,
images, and frames across the private_coreboundary as objects instead of
positional keyword lists and tuples. The public Python API and its output are
unchanged. - Reject conflicting encoder options, such as
lossless=Truewith PNG output,
before rendering rather than after. - Link the READMEs to the hosted documentation of the latest release instead of the
Markdown sources, and check that each link names an existing page in both
languages. - Restructure the documentation: English sources move to
docs/en/, new HTML and
CSS and Output formats guides take over from the overloaded rendering guide, the
release guide is now in English, and the README keeps only the overview,
installation, and quickstart. <img>without asrcnow parses as an empty box instead of raising
HtmlParseError.- Run the core fixture smoke test over upstream's relocated
fixtures-html
sources, which restores coverage to all 336 HTML fixtures.
Deprecated
FontResource.subset_ofnow only sets the family name, taking precedence over
name; usenamewithunicode_rangeinstead.dithering="floyd-steinberg"is an alias of"ordered-bayer"now that Takumi
has dropped its whole-image error-diffusion pass.
Removed
- Remove the testing-stage warnings from the READMEs and documentation home pages.
- Breaking: remove the compatibility shims deprecated in 0.2.0: the
fetched_resourcesargument of every render call andRenderOptions,
Renderer(persistent_images=...), andRenderer.load_font,load_fonts,
put_persistent_image, andclear_image_store. Passimagesto each render and
register fonts withregister_fontorregister_fonts; the Takumi v2 migration
guide maps each one. - Drop Python 3.10 support. takumi-py now requires Python 3.11 or later and
publishescp311-abi3wheels. - Drop the
typing-extensionsruntime dependency;TypedDictandNotRequired
come from the standard library on Python 3.11. - Drop the unused direct
parleydependency, which Takumi no longer uses.
Fixed
- Point deprecation warnings at the calling code. Nested public calls, such as
render_nodedelegating torender_compiled, attributed them totakumi_py
itself, where Python's default filters hideDeprecationWarning. - Enforce the documented frame-rate limits in
render_animation: above 90 fps for
WebP and APNG, or 50 fps for GIF, it now raisesValueErrorinstead of writing
frame delays that decoders clamp to 100 ms. - Document that
set_glyph_cache_max_byteshas no effect once the glyph cache is
in use, instead of claiming it raisesRuntimeError.
Commits
Breaking changes
- build: require Python 3.11 or later (56927f1)
- build(release): generate changelog entries with git-changelog (0f0233f)
- refactor: remove the compatibility shims deprecated in 0.2.0 (0fcd62c)
Features
- core: update Takumi to 2.17.1 (e04b503)
- api: adapt bindings to Takumi 2.17.1 (ca03d58)
- core: expose registered fonts (3caeb02)
- api: release registered fonts (b3c3300)
- add a budgeted font cache (884061d)
Bug fixes
- docs: open dev at a language root that has no release yet (a3d644b)
Performance
- animation: stream frames into the encoder (a78dad7)
Refactoring
- core: split the native extension into modules (fc7f8cd)
- api: pass native options as objects (835535f)
Documentation
v0.3.0
What's Changed
- feat: migrate native renderer to Takumi v2 by @BalconyJH in #1
- feat: add filter support to template rendering by @KomoriDev in #4
- Release v0.3.0 by @BalconyJH in #5
- fix(release): read parent version with uv by @BalconyJH in #6
New Contributors
- @BalconyJH made their first contribution in #1
- @KomoriDev made their first contribution in #4
Full Changelog: v0.2.0...v0.3.0
v0.2.0
v0.1.0
Important
takumi-py is currently in a testing stage. APIs, wheel build targets, release automation, and exception types may still change while the Takumi core binding surface is completed; do not treat it as a stable production dependency yet.
Highlights
- Expanded the Python binding beyond the initial static render path.
- Added typed
RenderOptionsfor viewport, DPR, debug border, dithering,time_ms, output format, and per-render resources. - Added measurement APIs returning typed measured node trees.
- Added custom font loading, persistent image resources, and per-render fetched resources.
- Added CSS animation sampling, sequence rendering, and WebP/APNG/GIF animated encoding.
- Replaced the experimental msgpack/pydantic path with
msgspec. - Added PEP 561 typing via
py.typedand_core.pyi. - Added CI, release automation, examples, and smoke tests.
Supported Wheels
- Linux x86_64
- Linux aarch64
- macOS arm64
- Windows x64
Install
pip install takumi-py