{"id":24319725,"url":"https://github.com/arrowtype/test-fontmake-rules-overlap","last_synced_at":"2026-02-22T18:37:34.409Z","repository":{"id":272643985,"uuid":"917286456","full_name":"arrowtype/test-fontmake-rules-overlap","owner":"arrowtype","description":"A reproduction case for a glyphsLib / FontMake issue","archived":false,"fork":false,"pushed_at":"2025-01-15T18:35:00.000Z","size":179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T10:36:57.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arrowtype.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-15T17:48:14.000Z","updated_at":"2025-01-15T18:35:02.000Z","dependencies_parsed_at":"2025-01-15T20:37:35.591Z","dependency_job_id":"6dfcad88-55da-4154-8851-5ee9455b40d7","html_url":"https://github.com/arrowtype/test-fontmake-rules-overlap","commit_stats":null,"previous_names":["arrowtype/test-fontmake-rules-overlap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arrowtype/test-fontmake-rules-overlap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrowtype%2Ftest-fontmake-rules-overlap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrowtype%2Ftest-fontmake-rules-overlap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrowtype%2Ftest-fontmake-rules-overlap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrowtype%2Ftest-fontmake-rules-overlap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arrowtype","download_url":"https://codeload.github.com/arrowtype/test-fontmake-rules-overlap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrowtype%2Ftest-fontmake-rules-overlap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29722031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T15:10:41.462Z","status":"ssl_error","status_checked_at":"2026-02-22T15:10:04.636Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2025-01-17T15:38:02.528Z","updated_at":"2026-02-22T18:37:34.372Z","avatar_url":"https://github.com/arrowtype.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# FontMake /ufo2ft issue\n\nA reproduction case for a FontMake (but really ufo2ft) issue (and partly also an issue in glyphsLib?).\n\nCore issue: https://github.com/googlefonts/ufo2ft/issues/852\n\nFont outlines based on Open Sans (https://github.com/googlefonts/opensans).\n\n## Problem\n\nIt is common to up “bracket layers” in Glyphs, in order to create alternate glyphs shapes for certain areas of a typeface’s designspace. For example, it is common to remove the middle bar of a `$` for bolder weights.\n\nCurrently, generating from a Glyphs document to static fonts has unexpected results, where certain fonts will have the wrong version of a glyph. This is partially caused by two issues:\n\n1. glyphsLib creates more rules than strictly necessary: it creates one rule for each area mentioned in any bracket layer, then places all glyphs with alternates in that area into each rule. This is slightly redundant, but shouldn’t cause a failure in the build. \n2. ufo2ft inteprets redudant rules in a way that toggles them off and on, in static font builds. Variable font builds work well.\n\n![diagram of the problem](img/test-fontmake-rules-overlap-diagram.png)\n\nThe above issues come from a `rules` element like this:\n\n```xml\n\u003crules\u003e\n    \u003crule name=\"BRACKET.Weight_650_800\"\u003e\n        \u003cconditionset\u003e\n            \u003ccondition name=\"Weight\" minimum=\"650\" maximum=\"800\"/\u003e\n        \u003c/conditionset\u003e\n        \u003csub name=\"Oslash\" with=\"Oslash.BRACKET.varAlt01\"/\u003e\n        \u003csub name=\"baht\" with=\"baht.BRACKET.varAlt01\"/\u003e\n        \u003csub name=\"dollar\" with=\"dollar.BRACKET.varAlt01\"/\u003e\n    \u003c/rule\u003e\n    \u003crule name=\"BRACKET.Weight_550_800\"\u003e\n        \u003cconditionset\u003e\n            \u003ccondition name=\"Weight\" minimum=\"550\" maximum=\"800\"/\u003e\n        \u003c/conditionset\u003e\n        \u003csub name=\"baht\" with=\"baht.BRACKET.varAlt01\"/\u003e\n        \u003csub name=\"dollar\" with=\"dollar.BRACKET.varAlt01\"/\u003e\n    \u003c/rule\u003e\n    \u003crule name=\"BRACKET.Weight_450_800\"\u003e\n        \u003cconditionset\u003e\n            \u003ccondition name=\"Weight\" minimum=\"450\" maximum=\"800\"/\u003e\n        \u003c/conditionset\u003e\n        \u003csub name=\"dollar\" with=\"dollar.BRACKET.varAlt01\"/\u003e\n    \u003c/rule\u003e\n\u003c/rules\u003e\n```\n\nThe “working” example comes from a `rules` element like this (with redundant rules removed):\n\n```xml\n\u003crules\u003e\n    \u003crule name=\"BRACKET.Weight_650_800\"\u003e\n        \u003cconditionset\u003e\n        \u003ccondition name=\"Weight\" minimum=\"650\" maximum=\"800\"/\u003e\n        \u003c/conditionset\u003e\n        \u003csub name=\"Oslash\" with=\"Oslash.BRACKET.varAlt01\"/\u003e\n        \u003c!-- baht rule removed --\u003e\n        \u003c!-- dollar rule removed --\u003e\n    \u003c/rule\u003e\n    \u003crule name=\"BRACKET.Weight_550_800\"\u003e\n        \u003cconditionset\u003e\n        \u003ccondition name=\"Weight\" minimum=\"550\" maximum=\"800\"/\u003e\n        \u003c/conditionset\u003e\n        \u003csub name=\"baht\" with=\"baht.BRACKET.varAlt01\"/\u003e\n        \u003c!-- dollar rule removed --\u003e\n    \u003c/rule\u003e\n    \u003crule name=\"BRACKET.Weight_450_800\"\u003e\n        \u003cconditionset\u003e\n        \u003ccondition name=\"Weight\" minimum=\"450\" maximum=\"800\"/\u003e\n        \u003c/conditionset\u003e\n        \u003csub name=\"dollar\" with=\"dollar.BRACKET.varAlt01\"/\u003e\n    \u003c/rule\u003e\n\u003c/rules\u003e\n```\n\n\n## Reproduction\n\nFirst, generate a UFO+designspace:\n\n```\nglyphs2ufo '01-src/ExampleSans.glyphs' --output-dir '02-glyphs2ufo'\n```\n\nThen, build fonts:\n\n```\nfontmake -o variable -m '02-glyphs2ufo/ExampleSans.designspace' --output-dir '03-fonts'\nfontmake -o otf -i -m '02-glyphs2ufo/ExampleSans.designspace' --output-dir '03-fonts'\n```\n\nFinally, open fonts in Font Goggles (or similar) and preview glyphs `$฿Ø`.\n\n## The fix, sort of\n\nIf the redundant rules are removed, the static fonts generate with the expected substitutions.\n\nHowever, this shouldn’t be necessary to generate fonts with expected glyph forms, so it would be much better for this issue to be fixed in FontMake (or in the appropriate library repsponsible for interpolating static fonts from a designspace – maybe ufo2ft?)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrowtype%2Ftest-fontmake-rules-overlap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farrowtype%2Ftest-fontmake-rules-overlap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrowtype%2Ftest-fontmake-rules-overlap/lists"}