Skip to main content

Load, examine and save fonts in a variety of formats

Project description

Babelfont: Load, examine and save fonts in a variety of formats

This describes Babelfont >3.0, which is a complete rewrite from the previous version.

Babelfont is a utility for loading fonts and examining fonts in a variety of formats. It can also be used to write fonts in some of these formats, making it possible to convert between font formats.

Here are the formats which are currently supported:

Format Read Write
Glyphs 2 partial
Glyphs 3 * *
.glyphspackage *
UFO *
Designspace *
Fontlab VFJ partial
Fontlab VFB partial
TTF partial *
OTF partial
Fontforge SFD partial *
Fontforge SFDir partial *
Babelfont * *

Babelfont converts all of the above font formats into a intermediary set of objects, whose object hierarchy can be seen here. The allows the developer to examine any font (single master or variable), without needing to worry about the details of each font format.

For example:

from babelfont import load

font = load("Myfont.glyphs") # Or .designspace, or whatever
default_a = font.default_master.get_glyph_layer("A")
top_anchor = default_a.anchors_dict["top"].x
print("Top anchor = (%i,%i)" % (top_anchor.x, top_anchor.y))
print("LSB, RSB = (%i,%i)" % (default_a.lsb, default_a.rsb))
font.save("Myfont.ttf")

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

babelfont-3.1.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

babelfont-3.1.0-py3-none-any.whl (559.6 kB view details)

Uploaded Python 3

File details

Details for the file babelfont-3.1.0.tar.gz.

File metadata

  • Download URL: babelfont-3.1.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for babelfont-3.1.0.tar.gz
Algorithm Hash digest
SHA256 60b4ac870f81ccf49045671abee5d78f334121b96027b95d2eeb91740d831ec4
MD5 b3c072d5001887078060c4c0018e0fdb
BLAKE2b-256 2cfe53ac665cbe3602d3085b802f039efdf1a01e30b72102aff487d9ee6f0371

See more details on using hashes here.

File details

Details for the file babelfont-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: babelfont-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 559.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for babelfont-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4964bf9a3eab22646a32f912e370beb2a247897fe57af8e9dffe0e35ca93a857
MD5 65f322ef69520e81d558fee58fa4636e
BLAKE2b-256 3f34773bc4c4bd32b57fa8147696fda165803df2a88a93a66d7eec9ec3e803f8

See more details on using hashes here.

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