tonsky / tonsky/FiraCode

Is it possible to "locl" feature to provide different ligatures for different programming language?

Open
#76 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

stylistic sets
Dominant language
Clojure
Stars
82k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

I am just curious about the language tags in Opentype. Considering the implementation of Serbian Cyrillic variants, they are done in like this:

lookup loclSerbian {
    sub [cyrbe cyrghe cyrde cyrpe cyrte] by [cyrbe.serbian cyrghe.serbian cyrde.serbian cyrpe.serbian cyrte.serbian];
} loclSerbian;

feature locl {
    script cyrl;
        language SRB  exclude_dflt;
            lookup loclSerbian;
} locl;

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the issue's OpenType language-tag and locl examples, then define whether language-specific ligatures are feasible and what editor or font behavior would be required for the request to be considered addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, javascript
Domain
design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.