Skip to main content

No project description provided

Project description

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()

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

fontit-0.2.2.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fontit-0.2.2-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file fontit-0.2.2.tar.gz.

File metadata

  • Download URL: fontit-0.2.2.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.12.0 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for fontit-0.2.2.tar.gz
Algorithm Hash digest
SHA256 812f74c63561d70a860dca20f73bca1e5852b4439bc2c6052933d4e0372f8aa9
MD5 2a732c3f96bceab509cc994b1b18d0c9
BLAKE2b-256 93c89ef794c44a0b3f4fb6ad0bc18b0bb1a741e0976572f0b88fa72f4d47ad6e

See more details on using hashes here.

File details

Details for the file fontit-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: fontit-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.12.0 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for fontit-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcf9d9e79f4e799bfdfb71d00e10212bf91c964f65fac40422445e8846a876a4
MD5 2f04ab0cf7c7583d4993e313b6bddf83
BLAKE2b-256 fda958366e08d445e735c569f6faace440a4c861599150eb882a331a1ca71edf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page