«zlogo» allows you to input text to generate logo images
Generate logo from text and obtain SVG and PNG format files simultaneously.
I want to design a personal logo. After find a lot of information, found that
So i wrote this script for everyone's convenience
Update in 2025
Kozea/CairoSVG is better suited for use with zlogo compared to svglib.
$ pip install zlogo
# Generate a logo with the text "hahaha"
$ zlogo -l hahaha
# Specify the font size as 100
$ zlogo -fs 100
# Set padding around the logo to 100 pixels
$ zlogo -p 100
# Define the output file path
$ zlogo -o ./zlogo.svg
# Use a configuration file to customize the logo
$ zlogo -c ~/zlogo/configs/readme.yaml
- For available configuration options, please refer to the example files:
avatar.yamlandreadme.yamlin theconfigs/directory. - Command-line arguments take precedence over settings in the configuration file.
There are two ways to specify a custom font:
-
Using the
-fparameter# You must provide the full path to a .ttf (TrueType) font file $ zlogo -f /path/to/your/font.ttf -
Using a configuration file
Place your font file in the
~/.fonts/directory, and then specify only the filename (not the full path) in the configuration file.
- zhujian - Initial work - zjykzj
Anyone's participation is welcome! Open an issue or submit PRs.
Apache License 2.0 © 2020 zjykzj