githubnext / monaspace

An innovative superfamily of fonts for code
https://monaspace.githubnext.com
SIL Open Font License 1.1
13.16k stars 219 forks source link

Texture healing not consistent #112

Closed nshern closed 1 month ago

nshern commented 7 months ago

Texture healing is not consistent. Three different widths of m next to an i

Screenshot 2023-11-14 at 15 38 20

Example is Monaspace Neon, using Helix editor in Wezterm.

mcendu commented 7 months ago

Example text:

It mimics the appearance of chests to prey on unsuspecting adventurers.

I would say this is a fairly niche case, but some different handling in calt might be helpful here.

dzolt commented 6 months ago

@nshern How did you enabled texture healing in wezterm? I can't find the option

valerykh commented 2 months ago

@nshern How did you enabled texture healing in wezterm? I can't find the option

According to WezTerm docs and VSCode instructions I came up with this to enable ligatures: config.harfbuzz_features = { "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss07", "ss08", "calt", "dlig" }

On Monaspace website it' saying

calt (contextual alternates) activates ligatures that adjust the visual positioning of some character sequences without altering their shape or appearance. Activating this feature will also enable texture healing.

I'm not sure regarding texture healing but ligature works fine. I hope this will useful.

I'm also use different faces for regular and italic if somebody interested.

config.font_rules = {
  {
    intensity = "Bold",
    italic = false,
    font = wezterm.font({
      family = "Monaspace Neon",
      weight = "Regular",
    }),
  },
  {
    italic = false,
    intensity = "Half",
    font = wezterm.font({
      family = "Monaspace Neon",
      weight = "ExtraLight",
    }),
  },
  {
    italic = false,
    intensity = "Normal",
    font = wezterm.font({
      family = "Monaspace Neon",
      weight = "Light",
    }),
  },
  {
    intensity = "Bold",
    italic = true,
    font = wezterm.font({
      family = "Monaspace Radon",
      weight = "Bold",
      style = "Italic",
    }),
  },
  {
    italic = true,
    intensity = "Half",
    font = wezterm.font({
      family = "Monaspace Radon",
      weight = "ExtraLight",
      style = "Italic",
    }),
  },
  {
    italic = true,
    intensity = "Normal",
    font = wezterm.font({
      family = "Monaspace Radon",
      style = "Italic",
      weight = "Light",
    }),
  },
}
valerykh commented 2 months ago

Texture healing is not consistent. Three different widths of m next to an i

Screenshot 2023-11-14 at 15 38 20

Example is Monaspace Neon, using Helix editor in Wezterm.

Looks like it can be reproduced just in WezTerm. I can confirm the issue is the same in WezTerm and in Helix inside WezTerm CleanShot 2024-04-18 at 20 44 19@2x

heathercran commented 1 month ago

This is a result of the texture healing feature. The first 'm' is the default width of the letter, the second one extends into the space of the 'i' preceding it, and the third one extends into the 'i's both before and after. So even though this is an odd-looking scenario, it is the intended effect of the feature.

I do agree that the texture healing could be a little more distributed in this case, so I will look into what can be done with the OpenType code. In the meantime, if it's too distracting for you, you can turn off texture healing by disabling the calt feature.

nshern commented 1 month ago

This is a result of the texture healing feature. The first 'm' is the default width of the letter, the second one extends into the space of the 'i' preceding it, and the third one extends into the 'i's both before and after. So even though this is an odd-looking scenario, it is the intended effect of the feature.

I do agree that the texture healing could be a little more distributed in this case, so I will look into what can be done with the OpenType code. In the meantime, if it's too distracting for you, you can turn off texture healing by disabling the calt feature.

Thanks for the repsonse. I guess this issue can be closed then as I understand it to be working as intended. Jetbrains Mono it is!