字体解析、ocr 工具
Project description
gfont
一个字体处理方法合集,含有以下方法
- to_xml:将字体文件转换为 xml
- to_img:将单个或所有字体转为 Image 对象
- to_ocr:将单个或所有字体识别转为 str、dict 对象
- get_glyph_order:获取字段信息列表
- get_best_cmap:获取十六进制与字段信息字典
安装
pip install gfont
使用环境
pip install font2img==2.2
pip install fonttools==4.29.1
pip install Pillow==9.3.0
pip install paddlepaddle==2.3.2 -i https://mirror.baidu.com/pypi/simple
pip install "paddleocr==2.6.0.1"
示例
from gfont import FontHelper
f = FontHelper(path=r'font.ttf')
print(f.to_ocr())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gfont-0.0.3.tar.gz
(3.7 kB
view details)
File details
Details for the file gfont-0.0.3.tar.gz
.
File metadata
- Download URL: gfont-0.0.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 504e5393cbc1a67b9f86908d826c3badeb75f875ce5d1c3dc9f4650d76f01f98 |
|
MD5 | b00cc1f2225c3fe23c27f23bec6ea542 |
|
BLAKE2b-256 | 37beae85075c9115dbc8b29dbcfc92541fa6056b4645c23b4f38fd76179a2ea0 |