1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 14:22:37 +03:00
A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
Go to file
Wez Furlong 3fae59b01b fonts: use cap-height metric to scale fallback fonts
we now compute the ratio of the cap height (the height of a capital
letter) vs. the em-square (which relates to our chosen point size) to
understand what proportion of the font point-size that a given font
occupies when rendered.

When rendering glyphs from secondary fonts we can use the cap height
ratios of both to scale the secondary font such that its effective
cap height matches that of the primary font.

In plainer-english: if you mix say bold, italic and regular text
style in the same line, and you have different font families for
those fonts, then they will now appear to be the same height where
previously they may have varied more noticeably.

For emoji and symbol fonts there may not be a cap-height metric
encoded in the font.  We can however, improve our scaling: prior
to this commit we'd use the ratio of the cell metrics of the two
fonts to scale the icon/emoji glyph, but this could cause the glyph
to be slightly oversized as seen in https://github.com/wez/wezterm/issues/624

If we know the cap-height of the primary font then we can additionaly
apply that factor to scale the emoji to better fit the cell.

While looking at this, I noticed that the aspect ratio calculation
for when to apply to the allow_square_glyphs_to_overflow_width option
had width and height flipped :-(

See also: https://tonsky.me/blog/font-size/
refs: https://github.com/wez/wezterm/issues/624
2021-04-13 23:02:27 -07:00
.cargo build static on windows for static openssl linkage 2020-02-02 13:03:07 -08:00
.github ci: fixup cirrus exclusion 2021-03-28 20:39:49 -07:00
assets Bundle PowerlineExtraSymbols as a fallback font 2021-03-06 19:12:35 -08:00
async_ossl Raise minimum Rust version to 1.51, de-vendor openssl on unix 2021-03-25 09:43:50 -07:00
base91 dyn everywhere 2019-06-08 21:28:11 -07:00
bintree bintree: clippy lint 2021-03-26 09:01:54 -07:00
ci docs: explicitly fetch nightly info 2021-04-05 12:29:13 -07:00
codec add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
config fonts: allow specifying weight/stretch/italic for each fallback font 2021-04-12 22:30:55 -07:00
deps Allow matching font weight and font width in wezterm.font 2021-04-08 15:42:53 -07:00
docs fix window vanishing when a tab is closed 2021-04-13 08:18:52 -07:00
env-bootstrap use $WEZTERM_LOG to configure log levels ad-hoc 2020-12-23 12:19:19 -08:00
filedescriptor fixup build on windows, and update tests 2021-03-27 20:40:40 -07:00
licenses macOS: bundle and use MetalANGLE to enable Metal rendering 2020-10-17 09:34:01 -07:00
luahelper lint: fix some clippy stuff 2021-03-25 10:05:34 -07:00
mux fix window vanishing when a tab is closed 2021-04-13 08:18:52 -07:00
promise deps: misc updates 2020-12-29 09:24:34 -08:00
pty pty: unconditionally export some unix+ssh specific things 2021-03-27 07:25:00 -07:00
rangeset fix an issue where rangeset::difference with itself gave bad results 2021-04-11 14:34:15 -07:00
ratelim move ratelim to its own crate 2020-10-03 11:15:57 -07:00
strip-ansi-escapes move strip-ansi-escapes into its own crate 2020-10-03 11:15:57 -07:00
tabout avoid excess capacity when dealing with iterm2 image protocol 2021-03-13 08:10:48 -08:00
term parse and respond to XTSMGRAPHICS queries 2021-04-01 22:42:28 -07:00
termwiz don't panic when double clicking space at the end of a wrapped line 2021-04-10 17:27:04 -07:00
test-data Render custom block glyphs 2021-02-28 09:43:26 -08:00
tmux-cc tmux: attach control mode parser to terminal 2020-11-20 09:24:50 -08:00
umask Take care to restore the original umask 2021-01-07 09:20:13 -08:00
vtparse vtparse: simplify TRANSITIONS const 2021-04-09 08:00:29 -07:00
wezterm Add wezterm ls-fonts subcommand 2021-04-12 09:44:27 -07:00
wezterm-client ssh: don't override the ssh config User value 2021-04-08 16:17:49 -07:00
wezterm-font fonts: use cap-height metric to scale fallback fonts 2021-04-13 23:02:27 -07:00
wezterm-gui fonts: use cap-height metric to scale fallback fonts 2021-04-13 23:02:27 -07:00
wezterm-gui-subcommands Add wezterm ls-fonts subcommand 2021-04-12 09:44:27 -07:00
wezterm-input-types windows: implement decoration setting, change to bitfield 2021-03-04 09:40:38 -08:00
wezterm-mux-server wezterm-mux-server: keep running after all panes are gone 2021-04-03 15:00:08 -07:00
wezterm-mux-server-impl add wezterm cli spawn command 2021-03-28 13:57:29 -07:00
wezterm-ssh ssh: don't override the ssh config User value 2021-04-08 16:17:49 -07:00
wezterm-toast-notification toast: hook up action/event handling on Windows 2021-03-14 15:23:42 -07:00
window macos: use alternative cursor hiding technique 2021-04-10 14:30:06 -07:00
.cirrus.yml ci: tweak freebsd ci for getdeps rust version check 2021-03-28 20:37:09 -07:00
.gitignore docs: for the new status bar feature 2021-03-10 19:29:17 -08:00
.gitmodules repoint to my freetype mirror 2021-02-03 21:56:30 -08:00
.rustfmt.toml Make rustfmt happy about "async move" 2020-01-20 13:58:21 -08:00
Cargo.lock Add wezterm ls-fonts subcommand 2021-04-12 09:44:27 -07:00
Cargo.toml Add wezterm ls-fonts subcommand 2021-04-12 09:44:27 -07:00
CONTRIBUTING.md Add get-deps script for installing dependencies 2018-02-25 09:24:56 -08:00
get-deps move sudo into script to not use sudo for rust checking 2021-04-02 22:36:27 -07:00
LICENSE.md wezterm: bundle JetBrains Mono and Noto Color Emoji fonts 2020-09-29 22:05:18 -07:00
README.md update for rename of master branch -> main 2021-02-03 21:34:12 -08:00
wt-record fixup wt-record on darwin 2021-03-20 20:14:17 -07:00
wt-replay update record/play scripts for macos 2019-03-22 20:41:50 -07:00

Wez's Terminal

WezTerm Icon 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

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:

The GitHub Discussions and Element/Gitter rooms are better suited to questions than it is to bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.