Crates.io | text-to-png-cli |
lib.rs | text-to-png-cli |
version | 0.2.0 |
source | src |
created_at | 2021-10-25 00:36:53.339636 |
updated_at | 2022-03-05 01:31:35.358056 |
description | A command-line tool to render text to a png image with basic options |
homepage | |
repository | https://github.com/RookAndPawn/text-to-png |
max_upload_size | |
id | 470608 |
size | 25,279 |
This crate provides a command-line application for rendering simple text to an image
This is a classic clap app, you can see all
the options with -h
kguthrie@home text-to-png % ./txt2png -h
Text To Png Cli 0.1.0
Kevin G. <kevin.guthrie@gmail.com>
Renders text to a png with some options
USAGE:
txt2png [OPTIONS] --output <file> [text]...
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --color <color> Color of the text: e.g. Brown, #45A2f4, 666 [default: Orange Red]
-o, --output <file> Path of the file to write the rendered png
-f, --font-file <font-file> ttf or ttc font file to use
-s, --font-size <font-size> Font height in pixels [default: 64]
ARGS:
<text>... All trailing arguments will be treated as the text to render
To render text into a png file with the default font, run:
kguthrie@home text-to-png % ./txt2png -o text.png -c DarkTurquoise -s 64 Rénder this, brö
And you'll get
To render text into a png file with the a custom font, run:
kguthrie@home text-to-png % ./txt2png -o text.png -c 439EC2 -s 52 -f "fonts/Because I am Happy Regular.ttf" "Custom Fonts are Cool\!"
And you'll get