mirror of
https://github.com/wez/wezterm.git
synced 2024-11-23 23:21:08 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
423b208780
opentype allows a font to have a weight in the range 0-1000. MacOS has its own concept of symbolic weight names and opentype values that is a slightly different scale of boldness to Windows and Linux. That means that Medium could be a different range of opentype weight values depending on the system. To further complicate things, the font designer can name their variant with any name they like and assign it an arbitrary opentype weight value. For the Operator Mono font, it has Book variant with opentype weight 325 and a Light variant with an opentype weight of 300. wezterm was considering these both to have `FontWeight::Light` because that's how those values were bucketed, which results in amibiguity in resolve the font and frustration in not being able to access one of the variants. This commit changes the `FontWeight` type to now hold the unambiguous opentype weight value, and to define some symbolic aliases for some specified weights. When serializing, if the weight matches a symbolic alias, then that name will be used in the canonical name (eg: as listed via ls-fonts). Otherwise, the numeric value will be used. When parsing the font configuration, wezterm will allow both symbolic and numeric values. This allows all of the Operator Mono variants to be referenced unambiguously, although some variants have to be specified via the numeric weight: ``` wezterm.font("Operator Mono", {weight=275, stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-XLight.otf, FontDirs wezterm.font("Operator Mono", {weight="Light", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Light.otf, FontDirs wezterm.font("Operator Mono", {weight=325, stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Book.otf, FontDirs wezterm.font("Operator Mono", {weight="DemiLight", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Medium.otf, FontDirs wezterm.font("Operator Mono", {weight="Regular", stretch="Normal", italic=false}) -- /Users/wez/.fonts/OperatorMono-Bold.otf, FontDirs ``` https://github.com/wez/wezterm/issues/849#issuecomment-873454483 |
||
---|---|---|
.cargo | ||
.github | ||
assets | ||
async_ossl | ||
base91 | ||
bintree | ||
ci | ||
codec | ||
color-types | ||
config | ||
deps | ||
docs | ||
env-bootstrap | ||
filedescriptor | ||
licenses | ||
luahelper | ||
mux | ||
promise | ||
pty | ||
rangeset | ||
ratelim | ||
strip-ansi-escapes | ||
tabout | ||
term | ||
termwiz | ||
test-data | ||
tmux-cc | ||
umask | ||
vtparse | ||
wezterm | ||
wezterm-client | ||
wezterm-font | ||
wezterm-gui | ||
wezterm-gui-subcommands | ||
wezterm-input-types | ||
wezterm-mux-server | ||
wezterm-mux-server-impl | ||
wezterm-ssh | ||
wezterm-toast-notification | ||
window | ||
.cirrus.yml | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
get-deps | ||
LICENSE.md | ||
README.md | ||
wt-record | ||
wt-replay |
Wez's Terminal
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
User facing docs and guide at: https://wezfurlong.org/wezterm/
Screenshot of wezterm on macOS, running vim
Installation
https://wezfurlong.org/wezterm/installation.html
Getting help
This is a spare time project, so please bear with me. There are a couple of channels for support:
- You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one.
- Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
- There is a Matrix room via Element.io for (potentially!) real time discussions.
The GitHub Discussions and Element/Gitter rooms are better suited for questions than bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.