{"id":15032722,"url":"https://github.com/i-tu/hasklig","last_synced_at":"2025-05-14T14:02:15.324Z","repository":{"id":15749131,"uuid":"18487827","full_name":"i-tu/Hasklig","owner":"i-tu","description":"Hasklig - a code font with monospaced ligatures","archived":false,"fork":false,"pushed_at":"2022-02-19T01:25:54.000Z","size":138068,"stargazers_count":5623,"open_issues_count":44,"forks_count":153,"subscribers_count":82,"default_branch":"main","last_synced_at":"2025-04-12T13:57:33.327Z","etag":null,"topics":["afdko","font","hasklig","ligatures","otf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"ofl-1.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/i-tu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-06T11:10:28.000Z","updated_at":"2025-04-09T02:28:29.000Z","dependencies_parsed_at":"2022-07-13T00:40:52.910Z","dependency_job_id":null,"html_url":"https://github.com/i-tu/Hasklig","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-tu%2FHasklig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-tu%2FHasklig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-tu%2FHasklig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i-tu%2FHasklig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i-tu","download_url":"https://codeload.github.com/i-tu/Hasklig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159169,"owners_count":22024558,"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":["afdko","font","hasklig","ligatures","otf"],"created_at":"2024-09-24T20:19:15.025Z","updated_at":"2025-05-14T14:02:10.306Z","avatar_url":"https://github.com/i-tu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Hasklig – _Ligatures for code_\n\nProgramming languages are limited to relatively few characters. As a result, combined character operators surfaced quite early, such as the widely used arrow (`-\u003e`), comprised of a hyphen and greater sign. It looks like an arrow if you know the analogy and squint a bit.\n\nComposite glyphs are problematic in languages such as Haskell which utilize these complicated operators (`=\u003e` `-\u003c` `\u003e\u003e=` etc.) extensively. The readability of such complex code improves with pretty printing. Academic articles featuring Haskell code often use [lhs2tex](https://www.andres-loeh.de/lhs2tex/) to achieve an appealing rendering, but it is of no use when programming.\n\nSome Haskellers have resorted to Unicode symbols (`⇒`, `←` _etc._), which are valid in the \u003cspan style=\"font-variant: small-caps\"\u003eghc\u003c/span\u003e. However they are one-character-wide and therefore eye-strainingly small. Furthermore, when displayed as substitutes to the underlying multi-character representation, as [vim2hs](https://github.com/dag/vim2hs) does, the characters go out of alignment.\n\nHasklig solves the problem the way typographers have always solved ill-fitting characters which co-occur often: [ligatures](https://en.wikipedia.org/wiki/Typographic_ligature). The underlying code stays the same — only the representation changes.\n\nNot only can multi-character glyphs be rendered more vividly, other problematic things in monospaced fonts, such as spacing can be corrected.\n\n#### Hasklig\n![Hasklig Sample](hasklig_example.png?raw=true)\n\n#### Source Code Pro\n![Source Code Pro Sample](SourceCodeProSample.png?raw=true)\n\n#### Currently implemented symbols\n`\u003c*` `\u003c*\u003e` `\u003c+\u003e` `\u003c$\u003e` `***` `\u003c|` `|\u003e`  `\u003c|\u003e` `!!` `||` `===` `==\u003e` `\u003c\u003c\u003c` `\u003e\u003e\u003e` `\u003c\u003e` `+++` `\u003c-` `-\u003e` `=\u003e` `\u003e\u003e` `\u003c\u003c` `\u003e\u003e=` `=\u003c\u003c` `..` `...` `::` `-\u003c` `\u003e-` `-\u003c\u003c` `\u003e\u003e-` `++` `/=` `==`\n\n### Building the fonts from source\n\n#### Requirements\n\nTo build the binary font files from source, you need to have installed the\n[Adobe Font Development Kit for OpenType](http://www.adobe.com/devnet/opentype/afdko.html) (AFDKO). The AFDKO\ntools are widely used for font development today, and are part of most font\neditor applications.\n\nSome SVG glyphs are inserted into the fonts using Python [FontTools](https://pypi.python.org/pypi/FontTools).\n\n#### Building font instances from masters\n\nThis repository only includes so-called *master* weights of the fonts (effectively extralight and black).\nThe shapes of the weights in between these extremities are calculated by `makeInstancesUFO` supplied with `.designspace` files.\nFor convenience, the shell script **makeInstances** is provided, which  executes `makeInstancesUFO`, calculating all the italic and regular font weight shapes.\n\n```sh\n$ ./makeInstances.sh\n```\n\n#### Building one font\n\nThe key to building OTF or TTF fonts is `makeotf`, which is part of the AFDKO toolset.\nInformation and usage instructions can be found by executing `makeotf -h`.\n\nIn this repository, all necessary files are in place for building the OTF and TTF fonts.\nFor example, build a binary OTF font for the Regular style like this:\n\n```sh\n$ cd Roman/Regular/\n$ makeotf -r\n```\n\n#### Building all fonts\n\nFor convenience, a shell script named **build** is provided in the root directory.\nIt builds all OTFs and TTFs, and can be executed by typing:\n\n```sh\n$ ./build.sh\n```\n\nor this on Windows:\n\n```sh\n\u003e build.cmd\n```\n\n\n### Credits\nOriginal idea, design and implementation of code ligatures by Ian Tuomi 2014-2015.\nThis typeface extends [Source Code Pro](https://github.com/adobe-fonts/source-code-pro) with ligatures.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-tu%2Fhasklig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi-tu%2Fhasklig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi-tu%2Fhasklig/lists"}