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.1.0.tar.gz (9.3 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.1.0-cp315-abi3.abi3t-win_amd64.whl (666.1 kB view details)

Uploaded CPython 3.15CPython 3.15+Windows x86-64

resvglite-0.1.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl (764.4 kB view details)

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

resvglite-0.1.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl (720.2 kB view details)

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

resvglite-0.1.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl (676.0 kB view details)

Uploaded CPython 3.15CPython 3.15+macOS 11.0+ ARM64

resvglite-0.1.0-cp314-cp314t-win_amd64.whl (666.7 kB view details)

Uploaded CPython 3.14tWindows x86-64

resvglite-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl (764.0 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

resvglite-0.1.0-cp314-cp314t-manylinux_2_28_aarch64.whl (720.5 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

resvglite-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl (676.8 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

resvglite-0.1.0-cp313-abi3-win_amd64.whl (666.2 kB view details)

Uploaded CPython 3.13+Windows x86-64

resvglite-0.1.0-cp313-abi3-manylinux_2_28_x86_64.whl (764.0 kB view details)

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

resvglite-0.1.0-cp313-abi3-manylinux_2_28_aarch64.whl (720.1 kB view details)

Uploaded CPython 3.13+manylinux: glibc 2.28+ ARM64

resvglite-0.1.0-cp313-abi3-macosx_11_0_arm64.whl (676.2 kB view details)

Uploaded CPython 3.13+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for resvglite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4dd6c1d81a1e91bc60a42f47bae4f559b8df9b02d87de35131e9a461765757c1
MD5 cd1a86d5b96283ae6cff1665561858cd
BLAKE2b-256 bcc2c9dd2ae19ca243ee19ae4ead6c4a86021d35c8032eac5c873731f3164765

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp315-abi3.abi3t-win_amd64.whl.

File metadata

  • Download URL: resvglite-0.1.0-cp315-abi3.abi3t-win_amd64.whl
  • Upload date:
  • Size: 666.1 kB
  • 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.1.0-cp315-abi3.abi3t-win_amd64.whl
Algorithm Hash digest
SHA256 ccbeb030a94718d7fb33f19d70ba01d89774fbf3c24b372258ca314225148c61
MD5 df4c77d1e4fdc267021b1a8fb2732098
BLAKE2b-256 addbb1577f59111f8e2fddd5c95a0d6783db38722dd34104f9483c91ff336bca

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 523ff57df3133d6411101424e8a257f19cdcb358ee02edf9cc1aa980749e5e37
MD5 43f2c68ef74b89dc6ccd90a7d5ba26e3
BLAKE2b-256 6ce5d8ab82b4483bbeb0f7f545c29bcf1a161cb5bbe57695204e1d97116b8f55

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 112f8c2aedc265f26720a9ada4350404730623e6ecc1a2c6e5bce84254b36e8c
MD5 81b62cfa96116ed21ab9ff6b1c90c1c5
BLAKE2b-256 df3b8dfe6d2d24fab9571ea406c3c3c47e881d93ed07b93b4daa92f87e2caf05

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp315-abi3.abi3t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a25a92d5d885d6c4a0a1d28542b78d24422ebd2b0c7068d9acbc3183d8978649
MD5 07ba2153d2770a83d740502682a1132b
BLAKE2b-256 75b5dae3be775d2bf5cce43c9b310a2476e5f88025a6d51ffd0d5738f2ae61d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: resvglite-0.1.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 666.7 kB
  • 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.1.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 7ec55bdada768280e7236155953f9428b711ea6ef8fb06dcf38b44c1588eff1a
MD5 42141d638cfa2bef0205ef16df0dd7e0
BLAKE2b-256 953c84ded21f7277926292a2ac399526c652c4e6c1d740e7688fc69de8b64aa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fe6fc00df9afeb0be356ca85565f6e9934cac1eed5dba9df7d4e330ec15a86c9
MD5 e79a3aa0959dbaa91a7548da623ba287
BLAKE2b-256 56de90a72414de748b0b0f606749b3c7814412bb1b69cdefbd0a4204a7712ea9

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 03991803b0b778e6d4624e13b08d3b567d312aa8db74f45171360214b7945181
MD5 d331ad4a5e91d4ff9f24e1409bc58b0d
BLAKE2b-256 93841c8d80b25bc800cda1b79134b772b22fc5b3c067b5ed33318a938c255566

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd6e1d069d5d3d3ea6901717b8550cb4c7179b87ff09911fa33f1bdec0d54465
MD5 3fc346445510cfd884b0db28ff813cb4
BLAKE2b-256 76e97d617a7893b9b08962414e7d5795f2bdffd1fd8359938bb11e32cde98c80

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp313-abi3-win_amd64.whl.

File metadata

  • Download URL: resvglite-0.1.0-cp313-abi3-win_amd64.whl
  • Upload date:
  • Size: 666.2 kB
  • 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.1.0-cp313-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 53e1be760122bd6fd19e076f69d28ec1564fd3a24a70c9e6f19e088dfdfc7309
MD5 04c7b7862181df69989b4c99c87119fc
BLAKE2b-256 fb615f30da07e697a00d6558b3a942b2940c4169925694c332c7097d90937158

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp313-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp313-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 606ed7970c23d017890dec8d8cab2e16be33fcbe393878ba3519021aa8d48cea
MD5 8d1c9047bfbf4ecaae500a49d8a86237
BLAKE2b-256 ef90536a227f55cc4b9be3ba979619563f3c4d074ef600580bb33b44d493773d

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp313-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp313-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 278dfc7eef911a77501484ca3d4b258d86241e263eb98ddd5764612fdd3ebe08
MD5 ab22ce5fdcf07422914623340f2d3b08
BLAKE2b-256 0bc6d6d70e3afd786b30bddd2088433045ae355b1d0649f117cd8246f1f40a18

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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.1.0-cp313-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for resvglite-0.1.0-cp313-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 343dce2ddf9c9bc34f3366944baa78d8400118e825c10bf5f19f7173f84e65bc
MD5 87ac52a94ce932093a2fd9f9aa58a0f9
BLAKE2b-256 0d85b4d3ce6f12fe8b41b7addd01fdf2e24a410c8bf696568d317b05cde4ec19

See more details on using hashes here.

Provenance

The following attestation bundles were made for resvglite-0.1.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