| Crates.io | text2svg |
| lib.rs | text2svg |
| version | 0.2.1 |
| created_at | 2023-09-02 20:41:06.401142+00 |
| updated_at | 2025-07-10 06:41:04.288966+00 |
| description | A command line tool help convert text to svg file |
| homepage | https://github.com/tizee/text2svg |
| repository | https://github.com/tizee/text2svg |
| max_upload_size | |
| id | 961908 |
| size | 129,459 |
A tool help to convert text to svg file with highlighting support.
A command line tool help convert text to svg file
Usage: text2svg [OPTIONS] [TEXT]
Arguments:
[TEXT] input text string
Options:
--width <WIDTH> max width per line (characters)
--pixel-width <PIXEL_WIDTH> max width per line (pixels)
-f, --file <FILE> input file
-o, --output <OUTPUT> output svg file path [default: output.svg]
--font <FONT> font family name (e.g., "Arial", "Times New Roman")
--size <SIZE> font size in pixels [default: 64]
--fill <FILL> svg fill color (e.g., "#ff0000", "none"). Overridden by highlight [default: none]
--color <COLOR> font stroke color (e.g., "#000", "currentColor"). Overridden by highlight [default: #000]
--animate Add progressive line-by-line draw animation effect (works best with stroke only)
--style <STYLE> font style (regular, bold, italic, etc.). Overridden by highlight [default: regular] [possible values: thin, extralight, light, regular, medium, semibold, bold, extrabold, black, italic]
--space <SPACE> letter spacing (in em units, e.g., 0.1) [default: 0]
--features <FEATURES> font features (e.g., "cv01=1,calt=0,liga=1")
--highlight Enable syntax highlighting mode for files
--theme <THEME> Syntax highlighting theme name or path to .tmTheme file [default: base16-ocean.dark]
--list-syntax List supported file types/syntax for highlighting
--list-theme List available built-in highlighting themes
-d, --debug Enable debug logging
--list-fonts List installed font families
-h, --help Print help
-V, --version Print version
The --animate flag creates a progressive line-by-line drawing animation where:
text2svg "Hello World" --font "Arial" --size 48 --output hello.svg
text2svg "Multi-line\nText Animation" --font "Arial" --animate --fill none --color "#000" --output animated.svg
text2svg --file script.js --highlight --theme "base16-ocean.dark" --output code.svg
text2svg "Long text that needs wrapping" --pixel-width 300 --font "Arial" --output wrapped.svg