Skip to content

Instantly share code, notes, and snippets.

@ErebusBat
Last active March 20, 2024 19:21
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErebusBat/9744f25f3735c1e0491f6ef7f3a9ddc3 to your computer and use it in GitHub Desktop.
Save ErebusBat/9744f25f3735c1e0491f6ef7f3a9ddc3 to your computer and use it in GitHub Desktop.
WezTerm - Monaspace /w Ligatures and Comments
return {
font = wezterm.font({
-- family='Monaspace Neon',
family='Monaspace Argon',
-- family='Monaspace Xenon',
-- family='Monaspace Radon',
-- family='Monaspace Krypton',
weight='Regular',
harfbuzz_features={ 'calt', 'liga', 'dlig', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08' },
}),
-- https://wezfurlong.org/wezterm/config/lua/config/font_rules.html
-- wezterm ls-fonts
-- wezterm ls-fonts --list-system
font_rules = {
--
-- Italic (comments)
--
{
intensity = 'Normal',
italic = true,
font = wezterm.font({
family="Monaspace Radon",
weight="ExtraLight",
stretch="Normal",
style="Normal",
harfbuzz_features={ 'calt', 'liga', 'dlig', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08' },
})
},
--
-- Bold (highlighting)
--
{
intensity = 'Bold',
italic = false,
font = wezterm.font({
family="Monaspace Krypton",
weight="Light",
stretch="Normal",
style="Normal",
harfbuzz_features={ 'calt', 'liga', 'dlig', 'ss01', 'ss02', 'ss03', 'ss04', 'ss05', 'ss06', 'ss07', 'ss08' },
})
},
},
}
@ErebusBat
Copy link
Author

Updated to add alternate font rules for italics and bold

@HaleTom
Copy link

HaleTom commented Nov 17, 2023

This doesn't do too well at the font smoke test with bold italic.

Here's my fix (also redundancy removed):
https://github.com/HaleTom/dotfiles/blob/a2049913a35676eb4c449ebaff09f65abe055f62/wezterm/.config/wezterm/wezterm.lua#L93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment