{"id":13721418,"url":"https://github.com/googlefonts/fontmake","last_synced_at":"2025-05-15T01:04:21.606Z","repository":{"id":38371546,"uuid":"47576910","full_name":"googlefonts/fontmake","owner":"googlefonts","description":"Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType).","archived":false,"fork":false,"pushed_at":"2024-12-03T12:00:07.000Z","size":5473,"stargazers_count":819,"open_issues_count":258,"forks_count":97,"subscribers_count":56,"default_branch":"main","last_synced_at":"2025-05-07T01:03:49.120Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlefonts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-07T20:19:24.000Z","updated_at":"2025-05-04T10:02:44.000Z","dependencies_parsed_at":"2022-07-14T04:50:29.819Z","dependency_job_id":"c5288769-bf5b-43e1-8ce6-8d5be1037c66","html_url":"https://github.com/googlefonts/fontmake","commit_stats":null,"previous_names":["googlei18n/fontmake"],"tags_count":80,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Ffontmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Ffontmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Ffontmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlefonts%2Ffontmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlefonts","download_url":"https://codeload.github.com/googlefonts/fontmake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253939144,"owners_count":21987411,"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":[],"created_at":"2024-08-03T01:01:16.772Z","updated_at":"2025-05-15T01:04:21.589Z","avatar_url":"https://github.com/googlefonts.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![GitHub Actions Build Status][] ![Python Versions][] [![PyPI\nVersion][]][1]\n\n# fontmake\n\n`fontmake` compiles fonts from various sources (`.glyphs`, `.ufo`, `designspace`) into binaries (`.otf`, `.ttf`). You can use it to create static instances and variable fonts.\n\n## Installation\n\nFontmake requires Python 3.8 or later.\n\nReleases are available on [PyPI][] and can be installed with [pip][].\n\n``` bash\npip3 install fontmake\n```\n\nUse the `-U`, `--upgrade` option to update fontmake and its dependencies\nto the newest available release:\n\n``` bash\npip3 install -U fontmake\n```\n\n## Basic Usage\n\nAfter installation, you will be able to use the `fontmake` executable.\n\nFor example, to compile a variable font from a Glyphs source file, use:\n\n``` bash\nfontmake MyFont.glyphs -o variable\n```\n\nThe most important command line arguments to the `fontmake` executable are the required input, specified either as positional argument or using one of `-g`/`-u`/`-m` flags, and the optional `-o` flag, which chooses the output file format.\n\n### Source file format options\n\nThere are two ways to specify the source file or files:\n\nOne can either use the following, mutually exclusive, flags:\n* `-g filename.glyphs`: Converts a Glyphs source file to binary.\n* `-u filename.ufo ...`: Converts one or more UFO(Z) files to binary.\n* `-m filename.designspace`: Converts a Designspace file to binary. (The `-m` is for `mutatormath`, an old Python library for handling designspaces.)\n\nAlternatively, one can specify the input(s) as positional arguments without the flag, letting fontmake infer the source format from the file extension: e.g. ``fontmake MyFont.designspace``, etc.\n\nNote: if the positional arguments are preceded by an option that takes one or more arguments, you need to use the special `--` separator to mark all following\narguments as positional (non-options), otherwise the parser gets confused. E.g., the `-i` option takes zero or one arguments (see futher below for details); without `--`, argparse thinks you didn't provide any inputs:\n\n```bash\nfontmake -i -- MyFont.designspace\n```\n\nExactly one type of input can/must be specified, using either approaches.\n\n### Output file format options\n\nYou may provide one or more output file formats after the `-o` option. For example, `-o otf ttf` creates OTF and TTF binary font files for each master in your input file.\n\nThe following output file formats are available:\n\n* `otf`: Per-master OTF (CFF-outline) binaries. Placed in the `master_otf/` directory.\n* `ttf`: Per-master TTF (TrueType-outline) binaries. Placed in the `master_ttf/` directory.\n* `otf-cff2`: Per-master OTF binaries with CFF2 outlines. Placed in the `master_otf/` directory.\n* `variable`: A TrueType variable font. Placed in the `variable_ttf/` directory.\n* `variable-cff2`: A variable font with CFF2 outlines. Placed in the `variable_otf/` directory.\n\nThe following output file formats are also available, but are generally used internally by fontmake as an intermediate step to one of the above outputs:\n\n* `otf-interpolatable`: OTF binaries suitable for merging into a variable font. Placed in the `master_otf_interpolatable/` directory. (These differ from `otf` in that the outlines are unoptimized.)\n* `ttf-interpolatable`: TTF binaries suitable for merging into a variable font. Placed in the `master_ttf_interpolatable/` directory. (The outlines are converted to quadratic curves in an interpolation-compatible way.)\n* `ufo`: Glyphs sources can be converted to UFO, or to UFO zip (`.ufoz`) format with the flag `--save-ufo-as-zip`. Placed in the `master_ufo/` directory. \n\nIf no format option is specified, the default is `-o otf ttf`.\n\n### Other important command line options\n\n* `-i` (Interpolate instances): Having per-master binaries is not always what you expect; if you have defined instances (\"exports\") in your Glyphs file, they will *not* be generated by default. To generate them, pass the `-i` flag, which interpolates static instances, and places them in the `instance_ttf/` or `instance_otf/` directory as appropriate.\n\n* `--output-dir \u003csome_directory\u003e`: Places all output in the given directory, instead of the per-format directories mentioned above.\n\n* `--output-path \u003cfilename\u003e`: This is only valid if the output is a single binary file, and writes the output to the given filename.\n\n* `-f` (Flatten components): Ensures that any glyphs which contain components which *themselves* contain components are decomposed to a single level. This is recommended as certain rendering environments do not correctly handle nested components - see [this link](https://github.com/googlefonts/fontbakery/issues/2961) for more details.\n\n## Advanced Usage\n\nSee [`USAGE.md`](USAGE.md).\n\n## Troubleshooting\n\nSee [`TROUBLESHOOTING.md`](TROUBLESHOOTING.md).\n\n## Developers\n\nDevelopers can get the latest version of `fontmake` by cloning the git repository:\n\n``` bash\ngit clone https://github.com/googlefonts/fontmake\ncd fontmake\npip install .\n```\n\nDevelopers who want to quickly test changes to the source code without re-installing can use the \"--editable\" option when installing from a local source checkout:\n\n``` bash\npip install -e .\n```\n\nIt is recommended to install fontmake inside a virtual environment to\nprevent conflicts between its dependencies and other modules installed\nglobally.\n\nYou could also use the [pipx][] tool to automate the\ninstallation/upgrade of python apps like fontmake in isolated\nenvironments.\n\n### Releasing a New Version\n\n0. Commit and push your final changes for the new version.\n1. Create an annotated Git tag of the version number, with a prepended \"v\", like so: `git tag -a v3.1.1`\n2. Write the release notes into the tag message. They will show up as release notes on the release page in GitHub.\n3. Push the tag like so: `git push origin v3.1.1`, where `origin` is the name of the usual remote you want to push the version to.\n\n  [GitHub Actions Build Status]: https://github.com/googlefonts/fontmake/workflows/Test%20+%20Deploy/badge.svg\n  [Python Versions]: https://img.shields.io/badge/python-3.8-blue.svg\n  [PyPI Version]: https://img.shields.io/pypi/v/fontmake.svg\n  [1]: https://pypi.org/project/fontmake/\n  [PyPI]: https://pypi.org/project/fontmake\n  [pip]: https://pip.pypa.io\n  [pipx]: https://github.com/pipxproject/pipx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglefonts%2Ffontmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglefonts%2Ffontmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglefonts%2Ffontmake/lists"}