Skip to main content

Handright

A lightweight Python library for simulating Chinese handwriting

released version python version license

Tutorial | Release Notes | Contributing

Vision

Reveal the nature of Chinese handwriting and use it to implement beautiful, simple and easy-to-use interfaces.

Algorithm

首先,在水平位置、竖直位置和字体大小三个自由度上,对每个字的整体做随机扰动。随后,在水平位置、竖直位置和旋转角度三个自由度上,对每个字的每个笔画做随机扰动。

Installation

pip install handright

Quick Start

# coding: utf-8
from PIL import Image, ImageFont

from handright import Template, handwrite

text = "我能吞下玻璃而不伤身体。"
template = Template(
    background=Image.new(mode="1", size=(1024, 2048), color=1),
    font=ImageFont.truetype("path/to/my/font.ttf", size=100),
)
images = handwrite(text, template)
for im in images:
    assert isinstance(im, Image.Image)
    im.show()

更多信息请参阅Tutorial。

Metadata

Release files for handrightbeta 8.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for handrightbeta 8.7.1
File Size Uploaded Provenance Actions
handrightbeta-8.7.1.tar.gz 16.4 kB Without provenance Details for handrightbeta-8.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for handrightbeta 8.7.1
File Interpreter ABI Platform Actions
handrightbeta-8.7.1-py3-none-any.whl Python 3 none any Details for handrightbeta-8.7.1-py3-none-any.whl

Total release size: 30.6 kB

Release files / handrightbeta-8.7.1.tar.gz

Download URL handrightbeta-8.7.1.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c0bb379dc576996274aeaa7f1ce7aa9abf861b2f83b9b9078d3693a49cfe04d0
BLAKE2b-256 checksum
How to use checksums
2c4783d8ed4131ba077cf43695d5e83d026970593a434199c307cef7b40d0b34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / handrightbeta-8.7.1-py3-none-any.whl

Download URL handrightbeta-8.7.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5b28d7623c0b07393b65378ae327ded4e6c47cb9474f2dded80b380e0f26857
BLAKE2b-256 checksum
How to use checksums
28d0249af47f9930ea1e08f1687caf49d047d3ad38d75b80b9a851150d82b2ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for handrightbeta 8.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page