
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
A powerful Python library to create beautifully styled text images with a simple, fluent API. Powered by Skia.
PicTex
makes it easy to generate styled text images for social media, video overlays, digital art, or any application where stylized text is needed. It abstracts away the complexity of graphics libraries, offering a declarative and chainable interface inspired by CSS.
pip install pictex
Creating a stylized text image is as simple as building a Canvas
and calling .render()
.
from pictex import Canvas
# 1. Create a style template using the fluent API
canvas = (
Canvas()
.font_family("path/to/font.ttf")
.font_size(60)
.color("white")
.padding(20)
.background_color(LinearGradient(["#2C3E50", "#FD746C"]))
.background_radius(10)
.add_shadow(offset=(2, 2), blur_radius=3, color="black")
)
# 2. Render some text using the template
image = canvas.render("Hello, PicTex! 🎨✨")
# 3. Save or show the result
image.save("hello.png")
You can also render it as SVG using Canvas.render_as_svg()
.
image = canvas.render_as_svg("Hello, PicTex! 🎨✨")
image.save("hello.svg")
For a complete guide on all features, including text decorations, advanced gradients, smart cropping, and more, check out our full documentation:
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A library to generate stylized text images.
We found that pictex demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.