PyLf
A lightweight Python library for simulating Chinese handwriting
Tutorial | Examples | 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 pylf
Quick Start
from PIL import Image, ImageFont
from pylf import Template, handwrite
text = "我能吞下玻璃而不伤身体。"
template = Template(
background=Image.new(mode="1", size=(1024, 2048), color=1),
font_size=100,
font=ImageFont.truetype("path/to/my/font.ttf"),
)
for image in handwrite(text, template):
image.show()
更多信息请参阅Tutorial。
Gallery
Metadata
Release files for pylf 4.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylf-4.1.0.tar.gz | 11.8 kB | Without provenance | Details for pylf-4.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylf-4.1.0-py3-none-any.whl | Python 3 | none | any | Details for pylf-4.1.0-py3-none-any.whl |
Total release size: 23.2 kB
Release files / pylf-4.1.0.tar.gz
| Download URL | pylf-4.1.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
374f7a60ad6cc3d3364943136b8849ee098d0b57fe3606b790c7bd7f23beb706
|
|
BLAKE2b-256 checksum How to use checksums |
c493f8ff782d796c49862981f72597fd2b67dc19898a3c6c11b04c294ccf489f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.4
|
Release files / pylf-4.1.0-py3-none-any.whl
| Download URL | pylf-4.1.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbf8a637d40590dbc1edcabe8bea7bf267a7f2fd661db162401c976cd308a887
|
|
BLAKE2b-256 checksum How to use checksums |
ed247aa2c2f172efde752907291315c7423a2339552cdf15108a45be9f883f26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.4
|
Security for pylf 4.1.0
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.