1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-22 04:07:31 +03:00
Commit Graph

365 Commits

Author SHA1 Message Date
Benoit de Chezelles
249f9dfe29 Use squares instead of circles for braille dots (for simplicity & perf) 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
d48cf4e5ee Few micro-optimizations for performance 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
831f3a8b51 Make the braille dots smaller (and the code clearer!) 2021-07-08 09:30:27 -07:00
Benoit de Chezelles
3d9e791b84 glyph: Add working braille custom glyphs 2021-07-08 09:30:24 -07:00
Wez Furlong
381a17d897 capture some more latency measurements in histograms 2021-07-08 08:54:10 -07:00
Wez Furlong
e4b2a5c55a cache style-derived data in the line render loop
Just a simple cache to avoid repeated computation for space-separated
runs of clusters with the same attributes.
2021-07-08 08:36:54 -07:00
Wez Furlong
33309d95ac refactor: extract cached_cluster_shape from line renderer 2021-07-08 07:56:01 -07:00
Wez Furlong
2c1b532281 avoid lookup after shape cache miss 2021-07-08 07:48:13 -07:00
Wez Furlong
d32c6fca23 refactor: extract resolve_fg_color_attr to module scope 2021-07-08 07:46:21 -07:00
Wez Furlong
33c87611dc remove use of cluster cell idx in ls-fonts 2021-07-08 07:25:35 -07:00
Wez Furlong
b08a6ab5ef instrument cache hit rates, fix duration histograms 2021-07-07 17:21:18 -07:00
Wez Furlong
aac2e78970 update http_req -> 0.8
0.8 doesn't seem to build with rusttls, but I don't think
we need that any more: we've been using vendored openssl on windows
and mac for some time.

closes: #924
refs: https://github.com/jayjamesjay/http_req/issues/48
2021-07-07 13:37:57 -07:00
Benoit de Chezelles
a35aeca082 glyphs: Make heavy lines visibly heavy 2021-07-07 13:26:23 -07:00
Wez Furlong
1b77cb3491 ls-fonts: report config file errors
Previously, if the config file had errors, ls-fonts would silently
continue with the default config, which was confusing.

Make a point of checking and reporting config file errors.
2021-07-04 08:55:08 -07:00
Benoit de Chezelles
305c64c7ab Move glyphs previews LHS, add missing descriptions 2021-07-04 07:33:41 -07:00
Benoit de Chezelles
0d355e4d72 glyph: Comment the actual char for easy visualization 2021-07-04 07:33:41 -07:00
Wez Furlong
e05ddb1737 fix force_reverse_video_cursor 2021-06-28 09:18:13 -07:00
Wez Furlong
4f9532f9d8 window: plumb font config to underlying window impl 2021-06-26 22:58:42 -07:00
Wez Furlong
e69869efa7 refactor deps so that window can depend on wezterm-font
I want to use this to render the font in the title bar
2021-06-26 22:58:42 -07:00
Wez Furlong
8ab025b7fc Allow building without wayland support
You can run `cargo build --release --no-default-features` to build
without wayland support.

This is useful for systems that do not have wayland (eg: the `slint`
distro).
2021-06-26 22:58:42 -07:00
Wez Furlong
2fc143e6dd click to focus window now focuses the pane under the mouse cursor
refs: https://github.com/wez/wezterm/issues/881
2021-06-26 15:24:17 -07:00
Wez Furlong
e786968578 adjust hinting for box drawing
This looks better at more sizes

refs: #584
2021-06-26 13:56:16 -07:00
Wez Furlong
b7f504b15e complete box drawing glyphs
refs: #584
2021-06-26 13:45:45 -07:00
Wez Furlong
24fbba66c2 even more box drawing glyphs 2021-06-26 12:28:11 -07:00
Wez Furlong
29f28885fa box drawing: cell arcs 2021-06-26 10:37:09 -07:00
Wez Furlong
4e7f73fab7 box drawing: half lines and mixed lines 2021-06-26 10:16:12 -07:00
Wez Furlong
08fb4eb858 more dashes, and the diagonals 2021-06-26 09:55:45 -07:00
Wez Furlong
0b5444ccfd always use own box glyphs for pane splits
This section of the code wasn't looking up the custom glyphs
and would always use the font.  We can make rendering a little
more efficient if we skip the font resolution for this case,
and the code is much simpler if we just use our own box drawing
glyphs, so that's what we're doing here.

refs: #584
2021-06-26 09:26:10 -07:00
Wez Furlong
843dd88bb5 improve box drawing rendering at smaller font sizes 2021-06-26 08:54:01 -07:00
Wez Furlong
4c0d789ac3 zeno -> tiny_skia
Mostly so that we can turn off anti-aliasing for smaller sizes,
but it also happens to be more complete anyway.
2021-06-25 22:55:42 -07:00
Wez Furlong
fad09eddda even more box drawing glyphs 2021-06-25 21:56:24 -07:00
Wez Furlong
f846f0c9e8 missed the chonky 4 vertical dash 2021-06-25 10:04:49 -07:00
Wez Furlong
8a3fb11598 more box drawing glyphs 2021-06-25 09:58:51 -07:00
Wez Furlong
d7975b15c5 more box glyphs 2021-06-25 09:23:01 -07:00
Wez Furlong
afe63357d3 top left line box glyphs
refs: #584
2021-06-25 00:23:42 -07:00
Wez Furlong
e0ea161673 Custom glyphs for box drawings solid and dashed lines
closes: #588
refs: #584
2021-06-24 23:19:09 -07:00
Wez Furlong
1e8b9ec0bb block glyphs: adjust poly to allow per-path stroke/weight 2021-06-23 10:03:29 -07:00
Wez Furlong
8f676bda36 remove dead code 2021-06-23 09:48:36 -07:00
Wez Furlong
709f33561b ls-fonts: indicate when we're using a custom glyph
```
; ./target/debug/wezterm ls-fonts --text '├─░'
├    \u{251c}     glyph=915  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
─    \u{2500}     glyph=891  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
░    \u{2591}     drawn by wezterm: Full(Light)
```
2021-06-23 09:20:35 -07:00
Wez Furlong
ea95f3f735 don't round mouse coords when mouse is grabbed
refs: https://github.com/wez/wezterm/issues/898
2021-06-22 20:39:51 -07:00
Wez Furlong
9b6fa8d6af remove extraneous log::warn 2021-06-20 17:24:12 -07:00
Wez Furlong
ae4bfae5c4 mouse cursor -> Arrow when app grabs mouse
closes: https://github.com/wez/wezterm/issues/859
2021-06-19 17:35:16 -07:00
Wez Furlong
fdf871c3cb fonts: add wezterm ls-fonts --text "hello" to explain per-glyph font
```
; ./target/debug/wezterm ls-fonts --text "␉ ␌ ␍ ␊ ␋"
␉    \u{2409}     glyph=885  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␌    \u{240c}     glyph=888  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␍    \u{240d}     glyph=889  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␊    \u{240a}     glyph=886  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
     \u{20}       glyph=2    wezterm.font("Operator Mono SSm Lig", weight="DemiLight", stretch="Normal", italic=false)
                             /home/wez/.fonts/OperatorMonoSSmLig-Medium.otf, FontDirs
␋    \u{240b}     glyph=887  wezterm.font("Terminus", weight="Bold", stretch="Normal", italic=false)
                             /home/wez/.fonts/terminus-bold.otb, FontDirs
```
2021-06-19 16:55:45 -07:00
Wez Furlong
d57bc9b3dc CloseCurrentPane on last pane in a tab results in window closing
The issue is that the pane was only removed from the tab when explicitly
closed, leaving it to be later detected and flushed.

However, in the meantime, when performing eg: cursor blink maintenance,
if the set of panes in the tab is empty then the window would close.

The resolution is to ask the mux (rather than the tab) to kill the pane,
so that the cascading closure of the tab causes the window's active
tab to reference the correct remaining tab.

refs: #890
2021-06-19 11:06:14 -07:00
Wez Furlong
e0b62d07ca ls-fonts: add --list-system flag to list system fonts
heads up @bew!

This is implemented on windows and font-config systems;
needs to be fleshed out for macos.

refs: https://github.com/wez/wezterm/issues/347
2021-06-17 09:11:54 -07:00
Wez Furlong
1be3d016b1 deps: windows 0.9 -> 0.11
closes: #872
2021-06-16 08:29:09 -07:00
Wez Furlong
a4550385fc adjust zeno paths to allow for curves, add rounded powerline
refs: #584
2021-06-13 23:21:55 -07:00
Wez Furlong
1b3df56a91 custom powerline triangle glyphs
refs: #584
2021-06-13 22:04:42 -07:00
Wez Furlong
a217f96d6b Add some smooth mosaic custom glyphs
This proves the concept of using the zeno crate to draw filled
polygons.

refs: #584
refs: #588
2021-06-13 16:50:35 -07:00
Wez Furlong
6c702b568f glyphcache: adopt zeno crate for drawing
This changes the fill_rect function over to use the zeno crate.
zeno allows describing a path and filling or stroking.
This commit doesn't strictly need that, but it sets things
up for more interesting custom glyphs in later commits.

refs: #584
refs: #588
2021-06-13 15:49:37 -07:00