A python library to convert text to laser. Single stroke fonts or ttf, control of position, typographic sizing, filling.
  • Python 98.4%
  • Makefile 1%
  • Dockerfile 0.6%
Find a file
pp-text2laser agent 6b96faae75
All checks were successful
ci / test (push) Successful in 5m47s
ci / release (push) Successful in 18s
ci / image (push) Has been skipped
ci / package (push) Has been skipped
ci / examples (push) Has been skipped
docs(testing): 📝 make coverage, what it reports and what it cannot tell
The target had a row in the table and nothing else. 40-TESTING now shows
the command, the shape of the report, that the CI runs it without ever
failing, and its two limits: a test in another process is not counted,
and a line that ran counts as covered whether or not it was checked.

Task: tasks/20261006-coverage.md
Tool: Claude Code
Model: claude-opus-5-5

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 20:19:01 +02:00
.forgejo/workflows ci: 🐛 compile the examples where they are, docs/examples 2026-10-06 20:17:48 +02:00
docs docs(testing): 📝 make coverage, what it reports and what it cannot tell 2026-10-06 20:19:01 +02:00
fonts 🐳 build: run everything in a debian image with hershey fonts 2026-09-28 09:44:58 +00:00
src/pp_text2laser fix(filling): 🐛 the ground around an outline letter no longer runs through its body 2026-10-04 20:26:50 +02:00
tasks build(coverage): ✨ make coverage, and a coverage report in CI that never fails it 2026-10-06 20:17:39 +02:00
tests build(coverage): ✨ make coverage, and a coverage report in CI that never fails it 2026-10-06 20:17:39 +02:00
tools docs: 📝 documentation rewritten: true, progressive, examples that run 2026-10-04 21:57:42 +02:00
.dockerignore docs: 📝 five numbered pages, two standard files, and twelve tests that 2026-10-03 08:51:54 +02:00
.gitignore docs(examples): 🐛 make example runs again: run.sh sources lib.sh 2026-10-04 21:57:18 +02:00
AGENTS.md docs: 📝 AGENTS says where things are, not how far they got, and the font order is confirmed 2026-10-06 20:05:13 +02:00
CHANGELOG.md chore(release): 🔖 v1.1.2 2026-10-04 20:26:15 +00:00
cliff.toml chore(cliff): 🔧 only feat and fix release, and the table git-cliff ignored is gone 2026-10-04 14:59:24 +02:00
CONTRIBUTING.md docs: 📝 documentation rewritten: true, progressive, examples that run 2026-10-04 21:57:42 +02:00
Dockerfile refactor: 🔧 one renderer, one version, and an examples framework that 2026-10-03 22:43:42 +02:00
Dockerfile.coverage build(coverage): ✨ make coverage, and a coverage report in CI that never fails it 2026-10-06 20:17:39 +02:00
Dockerfile.lint fix(lint): 🐛 the lint image copies a directory that no longer exists 2026-10-03 22:43:42 +02:00
LICENSE build: the package, GPLv3, and its chain in the pipeline 2026-09-29 10:04:40 +02:00
Makefile build(coverage): ✨ make coverage, and a coverage report in CI that never fails it 2026-10-06 20:17:39 +02:00
pyproject.toml build(coverage): ✨ make coverage, and a coverage report in CI that never fails it 2026-10-06 20:17:39 +02:00
README.md docs: 📝 documentation rewritten: true, progressive, examples that run 2026-10-04 21:57:42 +02:00
ROADMAP.md build(coverage): ✨ make coverage, and a coverage report in CI that never fails it 2026-10-06 20:17:39 +02:00
SECURITY.md docs: 📝 five numbered pages, two standard files, and twelve tests that 2026-10-03 08:51:54 +02:00
VERSION.txt chore(release): 🔖 v1.1.2 2026-10-04 20:26:15 +00:00

pp-text2laser

A Python library that turns a text request into the points a laser draws.

pip install --extra-index-url https://git.interhacker.space/api/packages/protonphoton/pypi/simple pp-text2laser
from pp_text2laser import build_converter

converter = build_converter()
frame = converter.frame({"text": "Hello", "size": 120})

print(frame.code)                   # 200: drawn as asked
print(frame.as_dict()["body"][:3])  # [x, y, color] per point; color 0 moves with the laser off

Python 3.11 or newer. Two dependencies, pyphen and fonttools. Fonts are not included; see docs/10-START_HERE.md.

Documentation

Page For
10-START_HERE installing, a first request, the glossary
20-HOW_TO_USE every request field, the strategies, the frame and its codes
30-EXTEND how it is built; your own sink, filling, font or strategy
40-TESTING the tests, the review cases, the playground
50-LIMITATIONS what does not work
ADR/ why each decision was taken
examples/ runnable examples, each in its own container
ROADMAP, CHANGELOG what is planned, what changed
CONTRIBUTING, SECURITY contributing, reporting a vulnerability

Working on it

Docker is the only prerequisite.

make test       # the test suite
make review     # the review pictures
make help       # every target

Packages: https://git.interhacker.space/protonphoton/-/packages. License: GPL-3.0-or-later, see LICENSE.