Library for text rendering
Project description
tenderness is a fast library for synthetic, deterministic document rendering from text and images, powered by Cairo and Pango.
-
Documentation: https://paperchase-labs.github.io/tenderness
-
Source Code: https://github.com/paperchase-labs/tenderness
-
Examples: https://github.com/paperchase-labs/tenderness-examples
[!IMPORTANT] 🚧 This library is in active development. We recommend pinning to a specific version for now.
Why tenderness?
Most document datasets don’t come from real structure — they come from reconstruction. Text is rendered, then reverse-engineered back into layout using OCR, heuristics, or fragile parsing pipelines. The result is noisy, incomplete, and not reproducible.
tenderness flips this entirely.
It renders text directly into documents producing images, SVGs, and PDFs with fully known layout from the start. Every character placement, line break, and block position is defined at render time — not inferred afterward.
What this gives you
- Generate large-scale synthetic document datasets
- Provide precise structural supervision for vision-language models
- Build benchmarks for layout understanding systems
- Ground-truth layout across characters, clusters, runs, and lines
No OCR. No heuristics. No reconstruction. No manual annotation.
Just text in → fully structured document out.
Main Features
-
Multi-format output: Render text and images into Image, SVG, PDF, or NumPy arrays.
-
Composable content blocks: Build documents from simple primitives:
TextBlock,ImageBlock, andTableBlock. -
Minimal flexbox layout engine: A lightweight system that automatically resolves positioning and flow.
-
Exact bounding boxes (OBB + AABB, logical + ink): Extract multi-level data for text (character, cluster, run, line, layout) and blocks.
-
Rich typography & text flow: Custom fonts, hierarchical styling, Pango markup, automatic font fallback, and overflow-aware text continuation across blocks.
-
Composable pipelines: Use the built-in pipeline with pre-defined layouts, or build your own from scratch.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tenderness-0.1.0.tar.gz.
File metadata
- Download URL: tenderness-0.1.0.tar.gz
- Upload date:
- Size: 89.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0cc8cde41835b3501a0bb00a3ce247d011e9d08fbbdcff968e5dfd22475e884
|
|
| MD5 |
b5462fd3bad5ac1cd212eaec8989e46a
|
|
| BLAKE2b-256 |
a8debcd98379c3188fc542d211cfe3ff1f6baa7ef5a2c48659b7a68917ad1cb5
|
File details
Details for the file tenderness-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tenderness-0.1.0-py3-none-any.whl
- Upload date:
- Size: 150.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6edbbe770f1e3d7a6764b1155e782338191532a47f9d27fae69835c2c6da2593
|
|
| MD5 |
d0073204aca607a7bfad01c1a0746a16
|
|
| BLAKE2b-256 |
9575605f9fced8a65b136f1e224496916086d7494918324bbcf715e0559901a3
|