Skip to main content

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

Metadata

Release files for gfont 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gfont 0.0.3
File Size Uploaded Provenance Actions
gfont-0.0.3.tar.gz 3.7 kB Without provenance Details for gfont-0.0.3.tar.gz

Release files / gfont-0.0.3.tar.gz

Download URL gfont-0.0.3.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
504e5393cbc1a67b9f86908d826c3badeb75f875ce5d1c3dc9f4650d76f01f98
BLAKE2b-256 checksum
How to use checksums
37beae85075c9115dbc8b29dbcfc92541fa6056b4645c23b4f38fd76179a2ea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.2

Security for gfont 0.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page