{"id":21389,"library":"glyphslib","title":"glyphsLib","description":"A Python library that bridges Glyphs source files (.glyphs) to UFOs (Unified Font Object) and back. It converts .glyphs files into UFO packages for further processing (e.g., with fontmake) and can also write back to .glyphs format. The current version is 6.13.0, with a relatively active release cadence (multiple minor releases per year). Requires Python >= 3.10.","status":"active","version":"6.13.0","language":"python","source_language":"en","source_url":"https://github.com/googlefonts/glyphsLib","tags":["font","glyphs","ufo","font-conversion","fontlab"],"install":[{"cmd":"pip install glyphslib","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for UFO and font operations","package":"fonttools","optional":false},{"reason":"UFO reading/writing","package":"ufoLib2","optional":false},{"reason":"Used for .glyphs file parsing","package":"protobuf","optional":false}],"imports":[{"note":"In older versions, GlyphsFile was under glyphslib.glyphsfile; now it's exported at package level.","wrong":"from glyphslib.glyphsfile import GlyphsFile","symbol":"GlyphsFile","correct":"from glyphslib import GlyphsFile"},{"note":"The load function is directly in the top-level package.","wrong":"from glyphslib.load import load","symbol":"load","correct":"from glyphslib import load"},{"note":"The to_ufos function is exported from glyphslib directly, even though the implementation is in glyphslib.builder.","wrong":"from glyphslib.builder import to_ufos","symbol":"to_ufos","correct":"from glyphslib import to_ufos"}],"quickstart":{"code":"from glyphslib import load, to_ufos\n\n# Load a .glyphs file\nglyphs_data = load('MyFont.glyphs')\n\n# Convert to UFO fonts (list of UFO objects for each master)\nufo_fonts = to_ufos(glyphs_data)\n\n# Now you can work with UFOs using fontTools or ufoLib2\nfor ufo in ufo_fonts:\n    print(ufo.info.familyName)\n","lang":"python","description":"Load a .glyphs file and convert it to UFOs using the high-level API."},"warnings":[{"fix":"Upgrade to Python 3.10+ or pin to glyphsLib <6.0.0 (e.g., pip install 'glyphslib<6').","message":"Version 6.0.0 dropped support for Python 3.9 and earlier. If you are on an older Python, you must use an older version of glyphsLib.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use the `validate` function or inspect the logs for unsupported features.","message":"The .glyphs file format (v2 vs v3) is auto-detected, but some custom parameters or new features in Glyphs 3 may not be fully supported. Always check for warnings or errors during conversion.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from glyphslib import load` instead of `from glyphslib.glyphs import load`.","message":"The `glyphslib.glyphs` submodule (direct .glyphs file parsing) is being deprecated in favor of the higher-level API in `glyphslib` package itself.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Check the generated .glyphs file in Glyphs.app for fidelity.","message":"When converting back to .glyphs (using `to_glyphs`), some UFO features like kerning exceptions or OpenType lookups may not round-trip perfectly. Always verify output.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install glyphslib` and ensure correct spelling: `import glyphslib`.","cause":"The library is not installed, or you used the wrong import name (e.g., 'glyphslib' instead of 'glyphslib').","error":"ModuleNotFoundError: No module named 'glyphslib'"},{"fix":"Upgrade to glyphsLib >=6.0: `pip install --upgrade glyphslib`. Or use `from glyphslib.glyphs import load` for older versions.","cause":"You might be using an older version of glyphsLib (pre-6.0) where the load function was in a submodule.","error":"AttributeError: module 'glyphslib' has no attribute 'load'"},{"fix":"Check the parameter name and report an issue. Often it can be safely ignored by passing `ignore_unknown_parameters=True` (if available) or by removing the parameter from the .glyphs file.","cause":"The .glyphs file contains a custom parameter that glyphsLib does not understand or implement.","error":"glyphslib.builder.BuildError: Unsupported custom parameter: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}