Files
LLeMbas-TTY/docs/config/lua/wezterm/font_with_fallback.md
T
Wez Furlong 21ce3f3262 docs: clean up the font documentation
Migrate information into the relevant config option pages, and
instead summarize with a demonstration of configuring the font.

For wezterm.font, there's now an expanded discussion on naming
and matching fonts.

closes: https://github.com/wez/wezterm/issues/560
2021-04-09 21:52:25 -07:00

23 lines
704 B
Markdown

# `wezterm.font_with_fallback(families [, attributes])`
This function constructs a lua table that configures a font with fallback processing.
Glyphs are looked up in the first font in the list but if missing the next font is
checked and so on.
The first parameter is a table listing the fonts in their preferred order:
```lua
local wezterm = require 'wezterm';
return {
font = wezterm.font_with_fallback({"JetBrains Mono", "Noto Color Emoji"}),
}
```
WezTerm implicitly adds its default fallback to the list that you specify.
The *attributes* parameter behaves the same as that of [wezterm.font](font.md)
in that it allows you to specify font weight and style attributes that you
want to match.