{"id":13494768,"url":"https://github.com/fonttools/fonttools","last_synced_at":"2025-09-09T21:24:10.818Z","repository":{"id":37270449,"uuid":"11639637","full_name":"fonttools/fonttools","owner":"fonttools","description":"A library to manipulate font files from Python.","archived":false,"fork":false,"pushed_at":"2025-05-05T14:48:40.000Z","size":27984,"stargazers_count":4635,"open_issues_count":403,"forks_count":472,"subscribers_count":118,"default_branch":"main","last_synced_at":"2025-05-05T14:53:55.707Z","etag":null,"topics":["fonts","opentype","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fonttools.png","metadata":{"files":{"readme":"README.rst","changelog":"NEWS.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-07-24T16:28:35.000Z","updated_at":"2025-05-05T07:12:56.000Z","dependencies_parsed_at":"2022-07-12T05:15:05.091Z","dependency_job_id":"52a7ca8f-8316-4903-b74c-13b1eedc3af1","html_url":"https://github.com/fonttools/fonttools","commit_stats":{"total_commits":10754,"total_committers":144,"mean_commits":74.68055555555556,"dds":0.6849544355588618,"last_synced_commit":"cb159dea72703e88b42353a45757f629b9593ede"},"previous_names":["behdad/fonttools"],"tags_count":233,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonttools%2Ffonttools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonttools%2Ffonttools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonttools%2Ffonttools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fonttools%2Ffonttools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fonttools","download_url":"https://codeload.github.com/fonttools/fonttools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253476371,"owners_count":21914548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fonts","opentype","python"],"created_at":"2024-07-31T19:01:27.941Z","updated_at":"2025-09-09T21:24:10.800Z","avatar_url":"https://github.com/fonttools.png","language":"Python","readme":"|CI Build Status| |Coverage Status| |PyPI| |Gitter Chat|\n\nWhat is this?\n~~~~~~~~~~~~~\n\n| fontTools is a library for manipulating fonts, written in Python. The\n  project includes the TTX tool, that can convert TrueType and OpenType\n  fonts to and from an XML text format, which is also called TTX. It\n  supports TrueType, OpenType, AFM and to an extent Type 1 and some\n  Mac-specific formats. The project has an `MIT open-source\n  license \u003cLICENSE\u003e`__.\n| Among other things this means you can use it free of charge.\n\n`User documentation \u003chttps://fonttools.readthedocs.io/en/latest/\u003e`_ and\n`developer documentation \u003chttps://fonttools.readthedocs.io/en/latest/developer.html\u003e`_\nare available at `Read the Docs \u003chttps://fonttools.readthedocs.io/\u003e`_.\n\nInstallation\n~~~~~~~~~~~~\n\nFontTools requires `Python \u003chttp://www.python.org/download/\u003e`__ 3.9\nor later. We try to follow the same schedule of minimum Python version support as\nNumPy (see `NEP 29 \u003chttps://numpy.org/neps/nep-0029-deprecation_policy.html\u003e`__).\n\nThe package is listed in the Python Package Index (PyPI), so you can\ninstall it with `pip \u003chttps://pip.pypa.io\u003e`__:\n\n.. code:: sh\n\n    pip install fonttools\n\nIf you would like to contribute to its development, you can clone the\nrepository from GitHub, install the package in 'editable' mode and\nmodify the source code in place. We recommend creating a virtual\nenvironment, using `virtualenv \u003chttps://virtualenv.pypa.io\u003e`__ or\nPython 3 `venv \u003chttps://docs.python.org/3/library/venv.html\u003e`__ module.\n\n.. code:: sh\n\n    # download the source code to 'fonttools' folder\n    git clone https://github.com/fonttools/fonttools.git\n    cd fonttools\n\n    # create new virtual environment called e.g. 'fonttools-venv', or anything you like\n    python -m virtualenv fonttools-venv\n\n    # source the `activate` shell script to enter the environment (Unix-like); to exit, just type `deactivate`\n    . fonttools-venv/bin/activate\n\n    # to activate the virtual environment in Windows `cmd.exe`, do\n    fonttools-venv\\Scripts\\activate.bat\n\n    # install in 'editable' mode\n    pip install -e .\n\nOptional Requirements\n---------------------\n\nThe ``fontTools`` package currently has no (required) external dependencies\nbesides the modules included in the Python Standard Library.\nHowever, a few extra dependencies are required by some of its modules, which\nare needed to unlock optional features.\nThe ``fonttools`` PyPI distribution also supports so-called \"extras\", i.e. a\nset of keywords that describe a group of additional dependencies, which can be\nused when installing via pip, or when specifying a requirement.\nFor example:\n\n.. code:: sh\n\n    pip install fonttools[ufo,lxml,woff,unicode]\n\nThis command will install fonttools, as well as the optional dependencies that\nare required to unlock the extra features named \"ufo\", etc.\n\n- ``Lib/fontTools/misc/etree.py``\n\n  The module exports a ElementTree-like API for reading/writing XML files, and\n  allows to use as the backend either the built-in ``xml.etree`` module or\n  `lxml \u003chttps://lxml.de\u003e`__. The latter is preferred whenever present,\n  as it is generally faster and more secure.\n\n  *Extra:* ``lxml``\n\n- ``Lib/fontTools/ttLib/woff2.py``\n\n  Module to compress/decompress WOFF 2.0 web fonts; it requires:\n\n  * `brotli \u003chttps://pypi.python.org/pypi/Brotli\u003e`__: Python bindings of\n    the Brotli compression library.\n\n  *Extra:* ``woff``\n\n- ``Lib/fontTools/ttLib/sfnt.py``\n\n  To better compress WOFF 1.0 web fonts, the following module can be used\n  instead of the built-in ``zlib`` library:\n\n  * `zopfli \u003chttps://pypi.python.org/pypi/zopfli\u003e`__: Python bindings of\n    the Zopfli compression library.\n\n  *Extra:* ``woff``\n\n- ``Lib/fontTools/unicode.py``\n\n  To display the Unicode character names when dumping the ``cmap`` table\n  with ``ttx`` we use the ``unicodedata`` module in the Standard Library.\n  The version included in there varies between different Python versions.\n  To use the latest available data, you can install:\n\n  * `unicodedata2 \u003chttps://pypi.python.org/pypi/unicodedata2\u003e`__:\n    ``unicodedata`` backport for Python 3.x updated to the latest Unicode\n    version 15.0.\n\n  *Extra:* ``unicode``\n\n- ``Lib/fontTools/varLib/interpolatable.py``\n\n  Module for finding wrong contour/component order between different masters.\n  It requires one of the following packages in order to solve the so-called\n  \"minimum weight perfect matching problem in bipartite graphs\", or\n  the Assignment problem:\n\n  * `scipy \u003chttps://pypi.python.org/pypi/scipy\u003e`__: the Scientific Library\n    for Python, which internally uses `NumPy \u003chttps://pypi.python.org/pypi/numpy\u003e`__\n    arrays and hence is very fast;\n  * `munkres \u003chttps://pypi.python.org/pypi/munkres\u003e`__: a pure-Python\n    module that implements the Hungarian or Kuhn-Munkres algorithm. Slower than\n    SciPy, but useful for minimalistic systems where adding SciPy is undesirable.\n\n  This ensures both performance (via SciPy) and minimal footprint (via Munkres)\n  are possible.\n\n  To plot the results to a PDF or HTML format, you also need to install:\n\n  * `pycairo \u003chttps://pypi.org/project/pycairo/\u003e`__: Python bindings for the\n    Cairo graphics library. Note that wheels are currently only available for\n    Windows, for other platforms see pycairo's `installation instructions\n    \u003chttps://pycairo.readthedocs.io/en/latest/getting_started.html\u003e`__.\n\n  *Extra:* ``interpolatable``\n\n- ``Lib/fontTools/varLib/plot.py``\n\n  Module for visualizing DesignSpaceDocument and resulting VariationModel.\n\n  * `matplotlib \u003chttps://pypi.org/pypi/matplotlib\u003e`__: 2D plotting library.\n\n  *Extra:* ``plot``\n\n- ``Lib/fontTools/misc/symfont.py``\n\n  Advanced module for symbolic font statistics analysis; it requires:\n\n  * `sympy \u003chttps://pypi.python.org/pypi/sympy\u003e`__: the Python library for\n    symbolic mathematics.\n\n  *Extra:* ``symfont``\n\n- ``Lib/fontTools/t1Lib.py``\n\n  To get the file creator and type of Macintosh PostScript Type 1 fonts\n  on Python 3 you need to install the following module, as the old ``MacOS``\n  module is no longer included in Mac Python:\n\n  * `xattr \u003chttps://pypi.python.org/pypi/xattr\u003e`__: Python wrapper for\n    extended filesystem attributes (macOS platform only).\n\n  *Extra:* ``type1``\n\n- ``Lib/fontTools/ttLib/removeOverlaps.py``\n\n  Simplify TrueType glyphs by merging overlapping contours and components.\n\n  * `skia-pathops \u003chttps://pypi.python.org/pypy/skia-pathops\u003e`__: Python\n    bindings for the Skia library's PathOps module, performing boolean\n    operations on paths (union, intersection, etc.).\n\n  *Extra:* ``pathops``\n\n- ``Lib/fontTools/ufoLib``\n\n  Package for reading and writing UFO source files; if available, it will use:\n\n  * `fs \u003chttps://pypi.org/pypi/fs\u003e`__: (aka ``pyfilesystem2``) filesystem abstraction layer\n\n  for reading and writing UFOs to the local filesystem or zip files (.ufoz), instead of\n  the built-in ``fontTools.misc.filesystem`` package.\n  The reader and writer classes can in theory also accept any object compatible the\n  ``fs.base.FS`` interface, although not all have been tested.\n\n- ``Lib/fontTools/pens/cocoaPen.py`` and ``Lib/fontTools/pens/quartzPen.py``\n\n  Pens for drawing glyphs with Cocoa ``NSBezierPath`` or ``CGPath`` require:\n\n  * `PyObjC \u003chttps://pypi.python.org/pypi/pyobjc\u003e`__: the bridge between\n    Python and the Objective-C runtime (macOS platform only).\n\n- ``Lib/fontTools/pens/qtPen.py``\n\n  Pen for drawing glyphs with Qt's ``QPainterPath``, requires:\n\n  * `PyQt5 \u003chttps://pypi.python.org/pypi/PyQt5\u003e`__: Python bindings for\n    the Qt cross platform UI and application toolkit.\n\n- ``Lib/fontTools/pens/reportLabPen.py``\n\n  Pen to drawing glyphs as PNG images, requires:\n\n  * `reportlab \u003chttps://pypi.python.org/pypi/reportlab\u003e`__: Python toolkit\n    for generating PDFs and graphics.\n\n- ``Lib/fontTools/pens/freetypePen.py``\n\n  Pen to drawing glyphs with FreeType as raster images, requires:\n\n  * `freetype-py \u003chttps://pypi.python.org/pypi/freetype-py\u003e`__: Python binding\n    for the FreeType library.\n    \n- ``Lib/fontTools/ttLib/tables/otBase.py``\n\n  Use the Harfbuzz library to serialize GPOS/GSUB using ``hb_repack`` method, requires:\n  \n  * `uharfbuzz \u003chttps://pypi.python.org/pypi/uharfbuzz\u003e`__: Streamlined Cython\n    bindings for the harfbuzz shaping engine\n    \n  *Extra:* ``repacker``\n\nHow to make a new release\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1) Update ``NEWS.rst`` with all the changes since the last release. Write a\n   changelog entry for each PR, with one or two short sentences summarizing it,\n   as well as links to the PR and relevant issues addressed by the PR. Do not\n   put a new title, the next command will do it for you.\n2) Use semantic versioning to decide whether the new release will be a 'major',\n   'minor' or 'patch' release. It's usually one of the latter two, depending on\n   whether new backward compatible APIs were added, or simply some bugs were fixed.\n3) From inside a venv, first do ``pip install -r dev-requirements.txt``, then run\n   the ``python setup.py release`` command from the tip of the ``main`` branch.\n   By default this bumps the third or 'patch' digit only, unless you pass ``--major``\n   or ``--minor`` to bump respectively the first or second digit.\n   This bumps the package version string, extracts the changes since the latest\n   version from ``NEWS.rst``, and uses that text to create an annotated git tag\n   (or a signed git tag if you pass the ``--sign`` option and your git and Github\n   account are configured for `signing commits \u003chttps://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits\u003e`__\n   using a GPG key).\n   It also commits an additional version bump which opens the main branch for\n   the subsequent developmental cycle\n4) Push both the tag and commit to the upstream repository, by running the command\n   ``git push --follow-tags``. Note: it may push other local tags as well, be\n   careful.\n5) Let the CI build the wheel and source distribution packages and verify both\n   get uploaded to the Python Package Index (PyPI).\n6) [Optional] Go to fonttools `Github Releases \u003chttps://github.com/fonttools/fonttools/releases\u003e`__\n   page and create a new release, copy-pasting the content of the git tag\n   message. This way, the release notes are nicely formatted as markdown, and\n   users watching the repo will get an email notification. One day we shall\n   automate that too.\n\n\nAcknowledgments\n~~~~~~~~~~~~~~~~\n\nIn alphabetical order:\n\naschmitz, Olivier Berten, Samyak Bhuta, Erik van Blokland, Petr van Blokland,\nJelle Bosma, Sascha Brawer, Tom Byrer, Antonio Cavedoni, Frédéric Coiffier,\nVincent Connare, David Corbett, Simon Cozens, Dave Crossland, Simon Daniels,\nPeter Dekkers, Behdad Esfahbod, Behnam Esfahbod, Hannes Famira, Sam Fishman,\nMatt Fontaine, Takaaki Fuji, Rob Hagemans, Yannis Haralambous, Greg Hitchcock,\nJeremie Hornus, Khaled Hosny, John Hudson, Denis Moyogo Jacquerye, Jack Jansen,\nTom Kacvinsky, Jens Kutilek, Antoine Leca, Werner Lemberg, Tal Leming, Liang Hai, Peter\nLofting, Cosimo Lupo, Olli Meier, Masaya Nakamura, Dave Opstad, Laurence Penney,\nRoozbeh Pournader, Garret Rieger, Read Roberts, Colin Rofls, Guido van Rossum,\nJust van Rossum, Andreas Seidel, Georg Seifert, Chris Simpkins, Miguel Sousa,\nAdam Twardoch, Adrien Tétar, Vitaly Volkov, Paul Wise.\n\nCopyrights\n~~~~~~~~~~\n\n| Copyright (c) 1999-2004 Just van Rossum, LettError\n  (just@letterror.com)\n| See `LICENSE \u003cLICENSE\u003e`__ for the full license.\n\nCopyright (c) 2000 BeOpen.com. All Rights Reserved.\n\nCopyright (c) 1995-2001 Corporation for National Research Initiatives.\nAll Rights Reserved.\n\nCopyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All\nRights Reserved.\n\nHave fun!\n\n.. |CI Build Status| image:: https://github.com/fonttools/fonttools/workflows/Test/badge.svg\n   :target: https://github.com/fonttools/fonttools/actions?query=workflow%3ATest\n.. |Coverage Status| image:: https://codecov.io/gh/fonttools/fonttools/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/fonttools/fonttools\n.. |PyPI| image:: https://img.shields.io/pypi/v/fonttools.svg\n   :target: https://pypi.org/project/FontTools\n.. |Gitter Chat| image:: https://badges.gitter.im/fonttools-dev/Lobby.svg\n   :alt: Join the chat at https://gitter.im/fonttools-dev/Lobby\n   :target: https://gitter.im/fonttools-dev/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n","funding_links":[],"categories":["Python","Python (1887)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonttools%2Ffonttools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffonttools%2Ffonttools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffonttools%2Ffonttools/lists"}