Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/biswadeep-roy/text-to-handwriting-converter
Convert plain text into handwritten-style images using this simple Python script.
https://github.com/biswadeep-roy/text-to-handwriting-converter
python python3
Last synced: 3 days ago
JSON representation
Convert plain text into handwritten-style images using this simple Python script.
- Host: GitHub
- URL: https://github.com/biswadeep-roy/text-to-handwriting-converter
- Owner: biswadeep-roy
- Created: 2021-10-05T15:08:18.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-30T15:32:39.000Z (about 1 year ago)
- Last Synced: 2024-11-08T10:26:44.978Z (about 2 months ago)
- Topics: python, python3
- Language: Python
- Homepage:
- Size: 157 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Text to Handwriting Converter
Convert plain text into handwritten-style images using this simple Python script.
![image](https://github.com/biswadeep-roy/Text-to-Handwriting-Converter/assets/74821633/325628f4-07cc-4a1e-b3ad-65f868ab5514)
# Table of Contents
Overview
Getting Started
Usage
Customization
Font
Examples
Contributing
License# Overview
This Python script allows you to convert plain text into a sequence of handwritten-style images. Each character in the input text is represented by a corresponding image in the "font" folder. The script combines these images to create a visual representation of the text, emulating a handwritten appearance.
# Getting Started
Clone the repository to your local machine:
``git clone https://github.com/biswadeep-roy/text-to-handwriting-converter.git
``Install the required Python libraries:
``pip install pillow
``# Usage
Run the script by providing a text file as input. If no input file is provided, the script will use the default "test.txt" file.
``python convert_text_to_handwriting.py input_file.txt
``The script will generate an image file with the converted text.
# Customization
myfont/bg.png: Background image for the handwriting. You can replace this with your preferred background.
myfont/{char_code}.png: Handwritten-style images for each character. You can add or replace images to change the handwriting style.
115: Adjust the scaling factor for character spacing to fit your preferred layout.
# Font
The "font" folder contains individual character images that make up the handwriting style. You can customize or replace these images to change the appearance of the handwritten text.
# Examples
Here are some examples of how to use the script:
Convert a custom text file:
``python convert_text_to_handwriting.py custom_text.txt
``Use the default "test.txt" file:
``python convert_text_to_handwriting.py
``
# ContributingContributions are welcome! If you have any ideas for improvements or new features, please open an issue or submit a pull request.