Skip to main content

resvglite

A thin PyO3 binding of resvg — the optional, self-contained SVG rasterizer behind saitenka's inline dictionary glyphs (issue #283).

Yomitan structured-content dictionaries embed inline img nodes that are almost always SVG gaiji (外字) — sense/section markers, orthography labels, reference glyphs (参照 / 表記 / 一). Pillow cannot rasterize SVG, so saitenka drew each as a box. resvglite rasterizes an SVG to a PNG at import; the renderer composites and tints it.

API

import resvglite

png_bytes, width, height = resvglite.render_svg(svg_bytes, size_px=64)

render_svg(data, size_px) rasterizes data (SVG bytes) to a PNG size_px tall, aspect-preserved, returning (png, w, h). Raises ValueError on invalid or zero-size SVG.

Why a vendored binding

resvg is pure Rust (usvg parser + tiny-skia raster) — no system libraries (unlike cairosvg/pyvips), so it ships prebuilt wheels: three per platform (pyo3 abi3 + abi3t, PEP 803) — abi3 (GIL 3.13+), cp314t (free-threaded 3.14), abi3t (FT and GIL 3.15+, gil_used = false), the same self-contained-wheel bar as taffylite. It is an optional add-on: without it, saitenka falls back to the /label placeholder.

Licensing

resvglite itself is MIT OR Apache-2.0. It vendors resvg/usvg/tiny-skia, which are MPL-2.0 (a file-level weak copyleft): the MPL covers only those vendored source files, not this wrapper or any code that merely imports it. Because resvglite is a separately published, optional wheel, that copyleft stays contained to this package — the core saitenka dependency graph remains permissive. See NOTICE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resvglite-0.2.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

resvglite-0.2.0-cp315-abi3.abi3t-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.15CPython 3.15+Windows x86-64

resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.15CPython 3.15+manylinux: glibc 2.28+ x86-64

resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.15CPython 3.15+manylinux: glibc 2.28+ ARM64

resvglite-0.2.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.15CPython 3.15+macOS 11.0+ ARM64

resvglite-0.2.0-cp314-cp314t-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.14tWindows x86-64

resvglite-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

resvglite-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

resvglite-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

resvglite-0.2.0-cp313-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13+Windows x86-64

resvglite-0.2.0-cp313-abi3-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13+manylinux: glibc 2.28+ x86-64

resvglite-0.2.0-cp313-abi3-manylinux_2_28_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.13+manylinux: glibc 2.28+ ARM64

resvglite-0.2.0-cp313-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13+macOS 11.0+ ARM64

File details

Details for the file resvglite-0.2.0.tar.gz.

File metadata

  • Download URL: resvglite-0.2.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for resvglite-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ea4e90f775a63a4dd0b4b95dcf914b543951e0dbddeb3653c9ec9d5f8d152000
MD5 a66afd25d17eefe6cc41017b0592a137
BLAKE2b-256 7908acc1a6c1284908f02de51c11fcb29ca4de1ec5b53ea6900ad103d310815b

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0.tar.gz:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp315-abi3.abi3t-win_amd64.whl.

File metadata

  • Download URL: resvglite-0.2.0-cp315-abi3.abi3t-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.15, CPython 3.15+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for resvglite-0.2.0-cp315-abi3.abi3t-win_amd64.whl
Algorithm Hash digest
SHA256 e55d24b13a6f142affac5803950818fa5e65c3e4b458c01bbcde7b6de0c2d399
MD5 3afeff18ed54117dccb3f97b29616135
BLAKE2b-256 ff4b1c9594e1f4fa2f4cc6b9a6d148b40393933dfc13d294acb3a1cace1325ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp315-abi3.abi3t-win_amd64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 13cbf23f6ee06f8be7d94c3649529bcb8e9f385f8b1d2544f8ed894a3df9f213
MD5 54330fa459eeaccf1ac01d3e5e14f72b
BLAKE2b-256 39e8eca38477f9f00bbefe1205ba8dd0e1948e00be3bedfee01f2846ca763193

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b2ab6291fd94347c499d8412095232e52a8836704759616f0bad218b44da032e
MD5 9c932ced4a695dbe37994358ab481d08
BLAKE2b-256 b36034bc838578cf09e8d19570433c8da0362a4dabfd54395ff5797fddbfc91d

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dddffeda720b297d53aa6c70c78bef42474f6d956e93b734e38b65438f8c1583
MD5 a2a15fbfe1a3c2cc7b32ff5a643ad4db
BLAKE2b-256 1cb7d4a95581a8d60c2cda6859c23a59f0ee9e681b4c3242104f9b7d6de2c1e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: resvglite-0.2.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for resvglite-0.2.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 ce66e5e3cd2013a7d82a570de5d12a417617f23ec84c87dc5468b91c07ff7186
MD5 ab9257da8456874052e53a32805918da
BLAKE2b-256 96e8673a3a20fba5ea12a2f8e0fafa67ec50de8fbe55b3a8acfbc455f9ef3362

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp314-cp314t-win_amd64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e7f6a690700acfc6547133c7337adfb400669c0ddf0487c6eb4ad4a10236bde
MD5 86c3ae35b7d3591299e10d12abc17078
BLAKE2b-256 924dedefe98eb4e05ac8035d1d76f31406ffd417624769b48f8d711018599d5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 021317de24d7a8bfe52e2befa52dff52e39bc2ca2897c5a78aa2e86cc08cedb4
MD5 eb5ea6529f7c63663562fe9fbe5a49c2
BLAKE2b-256 91451ddc88e2ee447ec3f14bdbf97aef0a15394505075a2c2b90136977f973a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp314-cp314t-manylinux_2_28_aarch64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5c80c56fad9c1c696b144b7d7fc3c4c94ae1bd1f0ec0946afdf0a31efe84be96
MD5 dd534e57cd3c3b20100ae4c345abd0ac
BLAKE2b-256 73c26f5d361a52933c414bc062e4a4eb7a56ba82db03a7d39d5fc9a33409882f

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp313-abi3-win_amd64.whl.

File metadata

  • Download URL: resvglite-0.2.0-cp313-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.13+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for resvglite-0.2.0-cp313-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a9ef0a531faea7817eba2dc9f8baef0171be346fbd1e0d9ed7f9e7b05679351f
MD5 951fe4eb47cb3e0108cdab03861555d1
BLAKE2b-256 ad31aa0463d2076c149fba4251d19370c37ab6da049e5238d7076e172377dd3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp313-abi3-win_amd64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp313-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 136cc91f957fcc770b86aa0f313b841a2ac69bdea2bac408b7fa8fc5bea62326
MD5 542702252b493b59e3573f83a9cbc5d7
BLAKE2b-256 9e792df825bd7355696a411e0f58a6b38487484470b63522039373de305cf70d

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp313-abi3-manylinux_2_28_x86_64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp313-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e7cfeceac6032a99f85321f7b77fee7c00da5c4b32a8461a89cef1e2b57b1046
MD5 1df9b6bd8ac3ff9fea0164758c89e15d
BLAKE2b-256 23e75ecffbfbc3f88bf90d81a363472b1c70286e21ed98aa7946474524b56b43

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp313-abi3-manylinux_2_28_aarch64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resvglite-0.2.0-cp313-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resvglite-0.2.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d9fd3570f63a581683c12052397dc25c8a4cb399fc223cb3e581c8e2483bc40
MD5 68f4e70281fde83c6a10661711094393
BLAKE2b-256 5e822a1b5a8c439e319f6c625094eebb99764747683cff868f263d1e87826af5

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.2.0-cp313-abi3-macosx_11_0_arm64.whl:

Publisher: resvglite-release.yml on serjflint/saitenka

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page