Skip to main content

Library for text rendering

Project description

Fallback image description

tenderness is a fast library for synthetic, deterministic document rendering from text and images, powered by Cairo and Pango.

[!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, and TableBlock.

  • 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


Download files

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

Source Distribution

tenderness-0.1.0.tar.gz (89.2 kB view details)

Uploaded Source

Built Distribution

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

tenderness-0.1.0-py3-none-any.whl (150.2 kB view details)

Uploaded Python 3

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

Hashes for tenderness-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0cc8cde41835b3501a0bb00a3ce247d011e9d08fbbdcff968e5dfd22475e884
MD5 b5462fd3bad5ac1cd212eaec8989e46a
BLAKE2b-256 a8debcd98379c3188fc542d211cfe3ff1f6baa7ef5a2c48659b7a68917ad1cb5

See more details on using hashes here.

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

Hashes for tenderness-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6edbbe770f1e3d7a6764b1155e782338191532a47f9d27fae69835c2c6da2593
MD5 d0073204aca607a7bfad01c1a0746a16
BLAKE2b-256 9575605f9fced8a65b136f1e224496916086d7494918324bbcf715e0559901a3

See more details on using hashes here.

Supported by

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