Iosevka icon indicating copy to clipboard operation
Iosevka copied to clipboard

Ligatures Customization: allow to disable specific ligatures

Open alexchexes opened this issue 1 year ago • 13 comments

Is your feature request related to a problem? Please describe. Kind of. One of the reasons why some people dislike ligatures is that you see one character, but it's actually another. For example, the right arrow ligature looks almost identical to the standard right arrow symbol (U+2192 or Alt+26). image I would like to exclude this specific ligature in my custom build.

Another use case is when someone might want to exclude a ligature like '==' that could be confused with the equal sign under certain circumstances. This is especially true when small notches are nearly invisible on a small font size or on a monitor with low/standard pixel density. image

Describe the solution you'd like The ability to exclude specific ligatures in the Iosevka customizer

Describe alternatives you've considered Idk, perhaps disabling ligatures entirely?

Additional context It would also be great if all ligatures were checked to avoid confusion with other standard symbols, as in the case of the right arrow example.

alexchexes avatar Aug 13 '23 06:08 alexchexes

It is doable using config files but for the website... I do not know how to preview ligations' cherrypicking results... Currently all the ligations are built all together, unlike CV/SS where we could cherrypick using OT features only.

be5invis avatar Aug 13 '23 06:08 be5invis

It is doable using config files

Could you please point me to a manual page that outlines how to do that?

alexchexes avatar Aug 13 '23 06:08 alexchexes

https://github.com/be5invis/Iosevka/blob/main/doc/custom-build.md#configuring-ligations Also: https://github.com/be5invis/Iosevka/blob/main/private-build-plans.sample.toml#L39

be5invis avatar Aug 13 '23 06:08 be5invis

Thank you, but now I am a little confused: What is the value that disables the left and right single arrow? Is it disables = ["arrow-l", "arrow-r"]? Because there are no examples in the lines that mention "arrow," so I can't figure out which exact ligatures are referred to here. Will it disable just the single arrows or the double arrows too?

Also, there are no examples for "counter-arrow-l" and "counter-arrow-r". What ligatures are implied?

alexchexes avatar Aug 13 '23 06:08 alexchexes

I think the examples are in https://github.com/be5invis/Iosevka/blob/main/params/ligation-set.toml https://github.com/be5invis/Iosevka/blob/17ce45acaf103c7274d2247f5abd940d77d114a3/params/ligation-set.toml#L58-L76

Logo121 avatar Aug 13 '23 08:08 Logo121

Ok, just now I made one more build with the following build plan using buildPlans.iosevka-custom.ligations..., and ligatures disappeared completely (even though they worked with a custom build plan that I initially obtained from the Customizer). What am I doing wrong?

[buildPlans.iosevka-custom]
family = "Iosevka Custom"
spacing = "normal"
serifs = "sans"
no-cv-ss = false
export-glyph-names = true

  [buildPlans.iosevka-custom.variants]
  inherits = "ss03"

    [buildPlans.iosevka-custom.variants.design]
    i = "zshaped"
    m = "short-leg-serifless"
    lower-alpha = "crossing"
    lower-chi = "curly-serifed"
    cyrl-capital-ze = "bilateral-serifed"
    zero = "oval-slashed-split"
    three = "flat-top"
    four = "semi-open"
    five = "oblique-upper-left-bar"
    six = "open-contour"
    eight = "crossing-asymmetric"
    nine = "open-contour"
    asterisk = "penta-mid"
    brace = "curly"
    dollar = "interrupted"
    percent = "rings-continuous-slash"
    cent = "bar-interrupted"
    lig-ltgteq = "flat"
    lig-neq = "more-slanted-dotted"
    lig-equal-chain = "with-notch"
    lig-hyphen-chain = "with-notch"
    lig-double-arrow-bar = "with-notch"
    lig-single-arrow-bar = "with-notch"

    [buildPlans.iosevka-custom.variants.italic]
    a = "single-storey-tailed"
    i = "serifed-diagonal-tailed"

  [buildPlans.iosevka-custom.ligations]
  disables = ["arrow-l", "arrow-r", "eqeq", "slash-asterisk", "plusplus", "connected-underscore", "connected-number-sign", "connected-tilde-as-wave"]
  enables = ["eqeqeq"]

[buildPlans.iosevka-custom.widths.normal]
shape = 640
menu = 5
css = "normal"

alexchexes avatar Aug 13 '23 08:08 alexchexes

@alexchexes You forgot inherits under [buildPlans.iosevka-custom.ligations]

be5invis avatar Aug 13 '23 08:08 be5invis

Alright, now it works, but the disables = ["arrow-r"] option actually disables => as well. However, as I mentioned when I opened this issue, I only wanted to disable -> (and probably <-). Is there a way to achieve that?

alexchexes avatar Aug 13 '23 09:08 alexchexes

@alexchexes We don't have that granuarlity yet (though we do have issues for them).

be5invis avatar Aug 13 '23 13:08 be5invis

Ok, thanks. Waiting for it and hope it’ll be implemented soon, since it is the real problem - confusing ligatures with existing Unicode symbols - and now we can only opt out of the ligatures group, instead of excluding a couple of conflicting ligatures in each group.

alexchexes avatar Aug 14 '23 04:08 alexchexes

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Oct 14 '23 00:10 github-actions[bot]

though we do have issues for them

Hi! Is there any progress on it?

alexchexes avatar Oct 25 '23 14:10 alexchexes

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Dec 25 '23 00:12 github-actions[bot]