Install
pip install fontit
Usage
import numpy as np
from PIL import Image, ImageDraw, ImageFont
from fontit import default_font
font = ImageFont.truetype(default_font, 32, )
canvas = np.zeros((640, 640, 3), dtype=np.uint8)
canvas = Image.fromarray(canvas)
draw = ImageDraw.Draw(canvas)
draw.text((40, 40), "你好,世界!", font=font, fill=(255, 255, 255))
draw.text((40, 80), "Hello World!", font=font, fill=(255, 255, 255))
canvas.show()
Release files for fontit 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fontit-0.2.2.tar.gz | 2.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fontit-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.8 MB
Release files / fontit-0.2.2.tar.gz
| Download URL | fontit-0.2.2.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
812f74c63561d70a860dca20f73bca1e5852b4439bc2c6052933d4e0372f8aa9
|
|
BLAKE2b-256 checksum How to use checksums |
93c89ef794c44a0b3f4fb6ad0bc18b0bb1a741e0976572f0b88fa72f4d47ad6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.12.0 Linux/5.15.90.1-microsoft-standard-WSL2
|
Release files / fontit-0.2.2-py3-none-any.whl
| Download URL | fontit-0.2.2-py3-none-any.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcf9d9e79f4e799bfdfb71d00e10212bf91c964f65fac40422445e8846a876a4
|
|
BLAKE2b-256 checksum How to use checksums |
fda958366e08d445e735c569f6faace440a4c861599150eb882a331a1ca71edf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.12.0 Linux/5.15.90.1-microsoft-standard-WSL2
|