Skip to content

zjykzj/zlogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

«zlogo» allows you to input text to generate logo images

Generate logo from text and obtain SVG and PNG format files simultaneously.

Table of Contents

Background

I want to design a personal logo. After find a lot of information, found that

  1. logo.svg can customize logo patterns and generate svg files
  2. svglib can convert svg to png

So i wrote this script for everyone's convenience

Update in 2025

Kozea/CairoSVG is better suited for use with zlogo compared to svglib.

Install

$ pip install zlogo

Usage

# 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

📁 Configuration File

  • For available configuration options, please refer to the example files: avatar.yaml and readme.yaml in the configs/ directory.
  • Command-line arguments take precedence over settings in the configuration file.

🔤 Font Files

There are two ways to specify a custom font:

  1. Using the -f parameter

    # You must provide the full path to a .ttf (TrueType) font file
    $ zlogo -f /path/to/your/font.ttf
  2. 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.

Maintainers

  • zhujian - Initial work - zjykzj

Thanks

Contributing

Anyone's participation is welcome! Open an issue or submit PRs.

License

Apache License 2.0 © 2020 zjykzj

About

ZLOGO turns your text into a custom logo, supporting both SVG and PNG formats

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors