monaspace icon indicating copy to clipboard operation
monaspace copied to clipboard

docs: `dlig` enables all ligatures

Open nickserv opened this issue 1 year ago • 10 comments

I've noticed that Monaspace enables all ligatures with dlig, so we can simplify the usage for VSCode:

"editor.fontFamily": "'calt', 'liga', 'dlig'"

This is equivalent to enabling all ligatures separately:

"editor.fontFamily": "'calt', 'liga', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06' 'ss07', 'ss08'"

nickserv avatar Nov 17 '23 08:11 nickserv

same for me I noticed that there are differences between the https://monaspace.githubnext.com/ page and the repository readme

massimo-cassandro avatar Nov 18 '23 14:11 massimo-cassandro

That's being tracked in #77. This issue is specifically about behavior in VSCode.

nickserv avatar Nov 19 '23 03:11 nickserv

This occurs in Wezterm too, so I don't think it's just a VSCode issue unless they both use Harfbuzz.

dlig seems to override and enable all ss0x options. Disabling a single ss0x option requires disabling dlig.

Disabling dlig doesn't seem to affect texture healing, so I don't mind that. But based on the Monaspace instructions, that doesn't seem to be how it's intended to work.

Wezterm font shaping docs: https://wezfurlong.org/wezterm/config/font-shaping.html

dlig disabled: image

dlig enabled with no ss0x options: image

dlig enabled with ss05 explicitly disabled: image

dlig disabled with ss05 explicitly disabled: image

Here is a minimal config if anyone would like to reproduce the issue in Wezterm. ~/.config/wezterm/wezterm.lua:

local wezterm = require("wezterm")
config = wezterm.config_builder()
config.font = wezterm.font_with_fallback {
  { family = "Monaspace Neon",
    harfbuzz_features = {
    'calt',
    'liga',
    'dlig',
    'ss01', -- ligatures related to the equals glyph like != and ===.
    'ss02', -- ligatures related to the greater than or less than operators.
    'ss03', -- ligatures related to arrows like -> and =>.
    'ss04', -- ligatures related to markup, like </ and />.
    'ss05=0', -- ligatures related to the F# programming language, like |>.
    'ss06', -- ligatures related to repeated uses of # such as ## or ###.
    'ss07', -- ligatures related to the asterisk like ***.
    'ss08', -- ligatures related to combinations like .= or .-.
    }
  }
}
return config

quot avatar Nov 21 '23 18:11 quot

This occurs in Wezterm too, so I don't think it's just a VSCode issue unless they both use Harfbuzz.

It's likely they both are, as Wezterm uses it by default and VSCode renders text with Chromium.

nickserv avatar Nov 22 '23 06:11 nickserv

dlig enabling everything is by-design behaviour (but it was introduced fairly late in the development cycle) - the problem is in the documentation/webpage which didn't get updated to cover this change.

Sorry for the confusion!

Krzysztof-Cieslak avatar Nov 22 '23 16:11 Krzysztof-Cieslak

Thanks for clarifying, I had a feeling this would be the case but wanted to confirm.

nickserv avatar Nov 23 '23 07:11 nickserv

So the little generator tool on the website is broken?

spikespaz avatar Apr 07 '24 18:04 spikespaz

This now does work: image

spikespaz avatar Apr 07 '24 18:04 spikespaz

@spikespaz can you post your config snippet please?

akhiljalagam avatar Apr 26 '24 04:04 akhiljalagam

@spikespaz can you post your config snippet please?

From where

spikespaz avatar Apr 26 '24 05:04 spikespaz

dlig is no longer used, as of version 1.1

heathercran avatar May 21 '24 23:05 heathercran