1
1
mirror of https://github.com/i-tu/Hasklig.git synced 2024-09-19 14:47:36 +03:00
Hasklig/README.md

53 lines
3.5 KiB
Markdown
Raw Normal View History

2014-04-19 22:06:04 +04:00
_N.B. This is a fork of the_ [Source Code Pro repository](https://github.com/adobe/source-code-pro)
2012-08-10 03:14:03 +04:00
2014-08-24 22:13:46 +04:00
### Hasklig - _Ligatures for Haskell code_
2014-04-19 22:27:53 +04:00
2014-08-24 22:13:46 +04:00
Programming languages are limited to relatively few characters. As a result, combined character operators surfaced quite early, such as the widely used arrow (`->`), comprised of a hyphen and greater sign. It looks like an arrow if you know the analogy and squint a bit.
2012-09-21 04:06:26 +04:00
2014-08-24 22:13:46 +04:00
Composite glyphs are problematic in languages such as Haskell which utilize these complicated operators (`=>` `-<` `>>=` etc.) extensively. The readability of such complex code improves with pretty printing. Academic articles featuring Haskell code often use [lhs2tex](http://www.andres-loeh.de/lhs2tex/) to achieve an appealing rendering, but it is of no use when programming.
2014-04-20 13:29:49 +04:00
2014-08-24 22:13:46 +04:00
Some Haskellers have resorted to Unicode symbols (`⇒`, `←` _etc._), which are valid in the <span style="font-variant: small-caps">ghc</span>. 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.
2014-08-24 22:13:46 +04:00
Hasklig solves the problem the way typographers have always solved ill-fitting characters which co-occur often: [ligatures](http://en.wikipedia.org/wiki/Typographic_ligature). The underlying code stays the same — only the representation changes.
Not only can multi-character glyphs be rendered more vividly, other problematic things in monospaced fonts, such as spacing can be corrected.
2014-07-28 23:23:32 +04:00
[**Download Hasklig Font Family v0.4**](https://github.com/i-tu/Hasklig/releases/download/0.4/Hasklig-0.4.zip)
2014-04-20 05:52:36 +04:00
2014-04-20 05:30:46 +04:00
#### Hasklig
2014-04-20 06:04:38 +04:00
![Hasklig Sample](hasklig_example.png?raw=true)
2014-04-20 05:30:46 +04:00
#### Source Code Pro
2014-04-19 22:06:04 +04:00
![Source Code Pro Sample](SourceCodeProSample.png?raw=true)
2014-08-25 13:28:44 +04:00
### Release notes
2014-08-24 22:13:46 +04:00
+ v0.4: New ligatures: `<*` `<*>` `<+>` `<$>` `***` `<|>` `!!` `||` `===` `==>`, [Powerline](https://github.com/Lokaltog/powerline) symbol support
+ v0.3: New ligatures: `<<<` `>>>` `<>` and `+++`
+ v0.2: Lengthened `==` and `/=` to match other equals signs
+ v0.1: Ligatures `<-` `->` `=>` `>>` `<<` `>>=` `=<<` `..` `...` `::` `-<` `>-` `-<<` `>>-` `++` `/=` and `==`
#### Editor Support
+ Atom (_add_ `text-rendering: optimizeLegibility;` _to your_ `.editor` <span style="font-variant: small-caps">css</span>. If that doesn't work, try disabling hardware acceleration in the settings)
2014-10-24 13:21:44 +04:00
+ BBEdit 11 ([Instructions](https://github.com/i-tu/Hasklig/issues/3#issue-46601683))
2014-04-19 23:21:42 +04:00
+ Chocolat
2014-04-26 01:09:38 +04:00
+ Geany
2014-04-20 01:52:03 +04:00
+ gEdit
2014-04-20 13:29:49 +04:00
+ Kate
2014-04-20 13:18:08 +04:00
+ Konsole
2014-04-20 13:29:49 +04:00
+ KWrite
2014-04-26 10:12:40 +04:00
+ Leksah (_x64 W8 reported not working_)
2014-10-24 13:21:44 +04:00
+ Light Table ([Instructions](https://github.com/LightTable/LightTable/issues/1459#issuecomment-57366504))
2014-07-28 23:19:57 +04:00
+ Smultron
2014-04-20 13:29:49 +04:00
+ TextEdit
2014-08-24 22:13:46 +04:00
+ TextMate (_from version 2.0-alpha.9549 onwards_)
2014-04-19 23:21:42 +04:00
2014-08-24 22:13:46 +04:00
#### No support
2014-08-31 13:30:10 +04:00
Some editors have replaced standard font rendering engines with custom ones and don't support ligatures.
2014-10-24 13:21:44 +04:00
- Emacs (_Support is currently under work._)
2014-08-31 13:30:10 +04:00
- gVim (_output corrupted. A_ [patch](https://groups.google.com/forum/#!topic/vim_dev/0sETSAwe5Wo) _exists, but it has not been incorporated into mainstream gVim._)
2014-11-13 19:38:36 +03:00
- Intellij IDEA ([Has feature request](https://youtrack.jetbrains.com/issue/IDEA-127539))
2014-08-31 13:30:10 +04:00
- iTerm2 ([details](https://code.google.com/p/iterm2/issues/detail?id=2974))
- MacVim (_Reversing_ [this commit](https://github.com/b4winckler/macvim/commit/8c8db3cd4cb094535ecb0254a7fb2e15be31d4fd) _makes ligatures show, but advancement is borked._)
2014-04-20 14:41:39 +04:00
- Sublime Text (_Vote for the enhancement_ [**here**](http://sublimetext.userecho.com/topic/433445-/))
2014-08-25 13:28:44 +04:00
- Terminal (OSX)