Skip to main content

A bridge from Glyphs source files (.glyphs) to UFOs

Project description

Travis Build Status PyPI Version Codecov

glyphsLib

This library provides a bridge from Glyphs source files (.glyphs) to UFOs via defcon.

The main methods for conversion are found in __init__.py. Intermediate data can be accessed without actually writing UFOs, if needed.

Write and return UFOs

Masters:

master_dir = 'master_ufos'
ufos = glyphsLib.build_masters('MyFont.glyphs', master_dir)

Interpolated instances (depends on MutatorMath):

master_dir = 'master_ufos'
instance_dir = 'instance_ufos'
ufos = glyphsLib.build_instances('MyFont.glyphs', master_dir, instance_dir)

Load UFO objects without writing

ufos = glyphsLib.load_to_ufos('MyFont.glyphs')

Read and write Glyphs data as Python objects

from glyphsLib import GSFont

font = GSFont(glyphs_file)

font.save(glyphs_file)

The glyphsLib.classes module aims to provide an interface similar to Glyphs.app’s Python Scripting API.

Note that currently not all the classes and methods may be fully implemented. We try to keep up to date, but if you find something that is missing or does not work as expected, please open a issue.

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

glyphsLib-2.1.0.zip (319.9 kB view details)

Uploaded Source

Built Distribution

glyphsLib-2.1.0-py2.py3-none-any.whl (271.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file glyphsLib-2.1.0.zip.

File metadata

  • Download URL: glyphsLib-2.1.0.zip
  • Upload date:
  • Size: 319.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for glyphsLib-2.1.0.zip
Algorithm Hash digest
SHA256 4d9bfd5388b8ef1167f9a11947fc0da2808731cef35bc8bbe33b9ff5e01c2144
MD5 965da8e853abcc778cc6dba0ddf4f5ff
BLAKE2b-256 f1199fb0f377abaae6d1b619339cbbf39669f0c3fc9e49b30777cd3a76d40f85

See more details on using hashes here.

Provenance

File details

Details for the file glyphsLib-2.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for glyphsLib-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 46f03877e495eb1791149a8eb5ac9c0c605ccddc4809b3a2589d41fe9c7d7e26
MD5 511b67d4b6bb32369f862605af3a1967
BLAKE2b-256 81210c7940782c78426ddc7c3a78b23b6e64c76e578cb618dac0259b22ad0e63

See more details on using hashes here.

Provenance

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