Skip to main content

PIXEL Renderer

This repository contains a text renderer for PIXEL models.

Usage

Install dependencies (conda-forge provides pre-built Cairo, Pango and PyGObject):

conda create -n pixel python=3.12 -y
conda activate pixel
conda install -c conda-forge pycairo pygobject pango -y
pip install ".[dev,pangocairo]"

Install:

pip install "pixel-renderer[pangocairo]"

Render text as an image (array):

from pixel_renderer.renderer import render_text

render_text(text="test", block_size=16, font_size=12)

For better consistency across platforms and easier reproducibility, we need to specify the exact fonts.

from font_download import FontConfig
from font_download.example_fonts.noto_sans import FONTS_NOTO_SANS
from pixel_renderer import PixelRendererProcessor

font_config = FontConfig(sources=FONTS_NOTO_SANS)
pixel_processor = PixelRendererProcessor(font=font_config)

pixel_processor.render_text_image("hello!").save("demos_output/hello.png")

pixel_processor.save_pretrained("demos_output/processor")

Cite

If you use this code in your research, please consider citing the work:

@misc{pixel2025renderer,
  title={PIXEL Renderer},
  author={Moryossef, Amit and Kesen, Ilker},
  howpublished={\url{https://github.com/sign/pixel-renderer}},
  year={2025}
}

Metadata

Release files for pixel-renderer 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pixel-renderer 0.1.5
File Size Uploaded
pixel_renderer-0.1.5.tar.gz 19.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pixel-renderer 0.1.5
File Interpreter ABI Platform
pixel_renderer-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 40.9 kB

Release files / pixel_renderer-0.1.5.tar.gz

Download URL pixel_renderer-0.1.5.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d53176cb95909a7d024a1848fa801f6f05d7fe1930c1525c31a849e7edcecea0
BLAKE2b-256 checksum
How to use checksums
2475acd918f9657678a7465aab5839da7e1396d3f483b68d6ccc6a7e6287bb5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / pixel_renderer-0.1.5-py3-none-any.whl

Download URL pixel_renderer-0.1.5-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62ffcb8f81b867236cef61be4be8810481f9c8447ea7dd049526d591d0131744
BLAKE2b-256 checksum
How to use checksums
02d9c00e28d10ea7e2555cb16c5a9f8d1d427176f5372b5717d70f172c82d28b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page