Convert text to custom handwriting
Project description
Handwrite - Type in your Handwriting!
Ever had those long-winded assignments, that the teacher always wants handwritten? Is your written work messy, cos you think faster than you can write? Now, you can finish them with the ease of typing in your own font!
Handwrite makes typing written assignments efficient, convenient and authentic.
Handwrite generates a custom font based on your handwriting sample, which can easily be used in text editors and word processors like Microsoft Word & Libre Office Word!
Handwrite is also helpful for those with dysgraphia.
Installing
Usage
Creating your Handwritten Sample
-
Take a printout of the sample form.
-
Fill the form using the image below as a reference.
-
Scan the filled form using a scanner, or Adobe Scan in your phone.
-
Save the
.jpg
image in your system.
Your form should look like this:
Creating your font
-
Make sure you have installed
handwrite
,potrace
&fontforge
. -
In a terminal type
handwrite [PATH TO IMAGE or DIRECTORY WITH IMAGES] [OUTPUT DIRECTORY]
. (You can also typehandwrite -h
, to see all the arguments you can use). -
(Optional) Config file containing custom options for your font can also be passed using the
--config [CONFIG FILE]
or--config [DIRECTORY WITH CONFIG FILES]
argument.Note:
- If passing a directory, make sure to rename the config files to the corresponding sheet names.
- If a single config file is passed for multiple inputs, that config will be used for all the inputs.
- If no config file is provided for an input then the default config file is used.
-
Your font will be created as
OUTPUT DIRECTORY/OUTPUT FONT NAME.ttf
. Install the font in your system. -
Select your font in your word processor and get to work!
Here's the end result!
Development
Linux
-
Install Potrace using apt
sudo apt-get install potrace
-
Install fontforge
sudo apt-get install fontforge
Since the PPA for fontforge is no longer maintained, apt might not work for some users. The preferred way to install is using the AppImage from: https://fontforge.org/en-US/downloads/
-
Clone the repository or your fork
git clone https://github.com/cod-ed/handwrite
-
(Optional) Make a virtual environment and activate it
python -m venv .venv source .venv/bin/activate
-
In the project directory run:
pip install -e .[dev]
-
Make sure the tests run:
python setup.py test
-
Install pre-commit hooks before contributing:
pre-commit install
You are ready to go!
Windows
-
Install Potrace and make sure it's in your PATH.
-
Install fontforge and make sure scripting is enabled.
-
Clone the repository or your fork
git clone https://github.com/cod-ed/handwrite
-
(Optional) Make a virtual environment and activate it
python -m venv .venv .venv\Scripts\activate
-
In the project directory run:
pip install -e .[dev]
-
Make sure the tests run:
python setup.py test
-
Install pre-commit hooks before contributing:
pre-commit install
You are ready to go!
Credits and Reference
-
Potrace algorithm and package has been immensely helpful.
-
Fontforge for packaging and adjusting font parameters.
-
Sacha Chua's project proved to be a great reference for fontforge python.
-
All credit for svgtottf converter goes to this project by pteromys. We made a quite a lot of modifications of our own, but the base script idea was derived from here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file handwrite-0.2.0.tar.gz
.
File metadata
- Download URL: handwrite-0.2.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 442b9de1381f4f3d1fdf4c629ebb7d04ffd5cbb3ec97b01156690967fa087ffb |
|
MD5 | 601415dbc0c0e3047c1ffdd2ddb8cb07 |
|
BLAKE2b-256 | 1e9542fd4d986d3d054da2d5a1f29de5b7b506cf8abc92c13999ca83e4a2e308 |
File details
Details for the file handwrite-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: handwrite-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48a9a1c8e9a9ebbff5bbabac4c9cf458c52f8834bc986a4a8ea62ab99e108ec6 |
|
MD5 | 4838962b5fcc7d8e6bd2926ca9730cc5 |
|
BLAKE2b-256 | ab625b9388a8e7dfdee129a081a36e151e526ac0236c6b20aa1a717349ad2a95 |