{"id":16410370,"url":"https://github.com/ctrlcctrlv/fontforge-higher-order-interpolation","last_synced_at":"2025-03-23T06:31:04.267Z","repository":{"id":48498128,"uuid":"312544550","full_name":"ctrlcctrlv/FontForge-Higher-Order-Interpolation","owner":"ctrlcctrlv","description":"Higher order interpolation, also known as non-linear interpolation, in FontForge and other 100% free software","archived":false,"fork":false,"pushed_at":"2021-07-22T18:13:12.000Z","size":2923,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-17T20:13:53.839Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ctrlcctrlv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-13T10:29:34.000Z","updated_at":"2024-09-19T06:16:11.000Z","dependencies_parsed_at":"2022-08-27T16:41:43.686Z","dependency_job_id":null,"html_url":"https://github.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FFontForge-Higher-Order-Interpolation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FFontForge-Higher-Order-Interpolation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FFontForge-Higher-Order-Interpolation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlcctrlv%2FFontForge-Higher-Order-Interpolation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrlcctrlv","download_url":"https://codeload.github.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066496,"owners_count":20555402,"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-10-11T06:24:06.158Z","updated_at":"2025-03-23T06:31:02.975Z","avatar_url":"https://github.com/ctrlcctrlv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Higher-order interpolation, a.k.a. non-linear interpolation, in FontForge\n\n![](https://raw.githubusercontent.com/ctrlcctrlv/FontForge-Higher-Order-Interpolation/main/dist/FontForgeHOI.gif)\n\n\u003e Mathematics belongs to God. ~ Donald Knuth\n\nHigher-order interpolation is a concept long thought to have benefits for type design, best explained by Underware in their April 2018 case study [\"Higher Order Interpolation for Variable Fonts\"](https://underware.nl/case-studies/hoi/). Credit is given to Underware for exciting users about the prospect of higher-order interpolation.\n\nThis is a software implementation of higher-order interpolation using only free software: FontForge, fontmake, and the Python scripts in this repository. The implementors of HarfBuzz, for example, already knew that such higher-order implementation was in theory possible, and made their software correctly understand fonts with linked axes for the purpose of implementing them.\n\nPlease see the [companion YouTube video](https://www.youtube.com/watch?v=m5z4sDECCGA) for more.\n\n# How this works\n\nIn a nutshell, `build.sh` does the following:\n\n* Uses the FontForge API to generate four UFO masters: A, B, C, and D;\n  * The A master is the position of all points at the beginning of the animation (axis value = 0). The B master is the position of the points offset by the first control point of the «HOI paths» layer spline for that point. Ditto for C, just with second control point. The D master is the position of all points at the end of the animation (axis value = 1000).\n* Run fontmake to combine those four masters using a specially designed `designspace` file.\n* Run my own script, which uses `fonttools.ttLib`, to “mangle” the output font. By this I mean, rename the axes in `fvar` and `STAT` so that all three axes appear to downstream software as one. Kudos to Dave Crossland for this idea.\n\n# Dependencies\n\n* FontForge\n* `fontmake`\n* Python library `fonttools`\n* harfbuzz\n\nAs in all my fonts, only free software is used.\n\n# UI tool\n\nTo receive the «Higher-Order Interpolation» item in the FontForge «Tools» menu, add `FF_HOI_UI.py` and the `lib/` directory to your FontForge Python directory. On my system, that is `~/.config/fontforge/python/`.\n\n# Changing glyph metrics along axis\n\nYou can change the glyph metrics at different states of the animation by adding a special comment to your glyph. See an example in the `period` glyph:\n\n```json\n!!FRB FF HOIINFO v0\n{\n  \"c1_rbearing\": 550,\n  \"c2_rbearing\": 550,\n  \"c3_rbearing\": 750\n}\n```\n\n* `c1` = master A\n* `c2` = master B\n* `c3` = master C\n* rbearing in SFD file = master D\n\n# License\n\nThis font editor implementation of higher-order interpolation (every file in this repository) is licensed under the Apache License v2.0.\n\nYou may not use these files except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlcctrlv%2Ffontforge-higher-order-interpolation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrlcctrlv%2Ffontforge-higher-order-interpolation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlcctrlv%2Ffontforge-higher-order-interpolation/lists"}