fonts: allow specifying weight/stretch/italic for each fallback font
This commit is contained in:
1 parent
fcd7ceef5c
commit
776aedf97e
7 files changed
+96
-26
No files matched your search
@@ -57,3 +57,17 @@ return {
|
||||
font = wezterm.font('Iosevka Term', {stretch="Expanded", weight="Regular"}),
|
||||
}
|
||||
```
|
||||
|
||||
An alternative form of specifying the font can be used, where the family and the attributes
|
||||
are combined in the same lua table. This form is most useful when used together with
|
||||
[wezterm.font_with_fallback](font_with_fallback.md) when you want to specify precise
|
||||
weights for the different fallback fonts:
|
||||
|
||||
```lua
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
return {
|
||||
font = wezterm.font({family='Iosevka Term', stretch="Expanded", weight="Regular"}),
|
||||
}
|
||||
```
|
||||
|
||||
@@ -20,3 +20,19 @@ 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.
|
||||
|
||||
*Since: nightly builds only*
|
||||
|
||||
The attributes can now be specified per fallback font using this alternative
|
||||
form where the family and attributes are specified as part of the same lua table:
|
||||
|
||||
```lua
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
return {
|
||||
font = wezterm.font_with_fallback({
|
||||
{family="JetBrains Mono", weight="Medium"},
|
||||
{family="Terminus", weight="Bold"},
|
||||
"Noto Color Emoji"),
|
||||
}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user