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.0.tar.gz (10.2 MB view hashes)

Uploaded Source

Built Distribution

fontit-0.2.0-py3-none-any.whl (10.3 MB view hashes)

Uploaded Python 3

Supported by

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