-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to "locl" feature to provide different ligatures for different programming language? #76
Comments
maybe the better thing would be using generic font features, as locl seems to be about human languages 😜 your example and others mentioned in #13 could be fixed by using a editor with configurable font features (e.g. atom by using CSS |
@flying-sheep My concern is about the meaning of symbols. Given that |
exactly. my point was that i think this can be done without misusing localization features, and instead using stylistic alternatives ( e.g. there could maybe be a stylistic alternative assigned to haskell that could be enabled in atom like this: .haskell { font-feature-settings: "salt" 2; } |
There is one particularly important change necessary for
|
i thought this font combines =~ and not ~=? /edit: ah ic combines both. hmm, yeah, then this is another valid use case. |
One could argue that |
In Perl 6, |
so which languages do use it this way? if there are some, this is a use case for conditional ligature sets. if there aren’t (or only very obscure ones), we should drop the |
As an alternative, we could do language specific builds. Editors like VS Code allow language specific fonts. Combined with #1387, we should be able to make language specific builds which only enable ligatures that make sense for that language. This would also resolve any conflicts. |
Same applies to stylistic variants, see e.g. the “Code ligatures” header for monaspace (yeah, I know it’s an abomination that that page has no anchors to link to):
|
I am just curious about the language tags in Opentype. Considering the implementation of Serbian Cyrillic variants, they are done in like this:
so if some editor can provide "languages" for Opentype it is possible to use
locl
feature to provide different ligatures for different languages. This is necessary, for example, in Haskell and JavaScript, the combination/=
has different meaning.The text was updated successfully, but these errors were encountered: