Text renderer for PIXEL models
Project description
PIXEL Renderer
This repository contains a text renderer for PIXEL models.
Usage
Install dependencies:
conda create -n pixel python=3.12 -y
conda activate pixel
pip install ".[dev,pangocairo]"
[!TIP] Having trouble installing
pycairoandpygobject? See these instructions.
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}
}
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 pixel_renderer-0.1.0.tar.gz.
File metadata
- Download URL: pixel_renderer-0.1.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
074d7f8a4070ffe42db369a17b7a7a0921c593ac93effed4bea9ec4764d874b7
|
|
| MD5 |
2752db8777c32948bb49660a8933536b
|
|
| BLAKE2b-256 |
f22c893c52822d9419e7c6d408854093664820800430bfe11e4b25f07047e8c4
|
Provenance
The following attestation bundles were made for pixel_renderer-0.1.0.tar.gz:
Publisher:
release.yaml on sign/pixel-renderer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pixel_renderer-0.1.0.tar.gz -
Subject digest:
074d7f8a4070ffe42db369a17b7a7a0921c593ac93effed4bea9ec4764d874b7 - Sigstore transparency entry: 743367006
- Sigstore integration time:
-
Permalink:
sign/pixel-renderer@19681f5751e5965821e86420d0e44f61be993141 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sign
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@19681f5751e5965821e86420d0e44f61be993141 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pixel_renderer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pixel_renderer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf7cce25dc2c1e8148bee0e936e81207a5b2360f5a2e0ebaba72e14f1927d7a8
|
|
| MD5 |
4d61cad235487af5f50c029ef3367a15
|
|
| BLAKE2b-256 |
1b1a9640e76f213266f9137aaa620355516d2beab93f5b2cba4159e15add3be3
|
Provenance
The following attestation bundles were made for pixel_renderer-0.1.0-py3-none-any.whl:
Publisher:
release.yaml on sign/pixel-renderer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pixel_renderer-0.1.0-py3-none-any.whl -
Subject digest:
bf7cce25dc2c1e8148bee0e936e81207a5b2360f5a2e0ebaba72e14f1927d7a8 - Sigstore transparency entry: 743367013
- Sigstore integration time:
-
Permalink:
sign/pixel-renderer@19681f5751e5965821e86420d0e44f61be993141 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/sign
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@19681f5751e5965821e86420d0e44f61be993141 -
Trigger Event:
release
-
Statement type: