1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-11 03:27:05 +03:00
Commit Graph

263 Commits

Author SHA1 Message Date
Wez Furlong
8c3477006f Allow using unit like "1cell" or "5%" for window_padding
This commit introduces the `Dimension` type which allows specifying
a value in a variety of units; pixels, points, cells, percent.

`Dimension` needs contextual information to be evaluated as pixel
values, which makes resolving the value from the config slightly
more of a chore.

However, this type allows more flexible configurations that scale
with the font size and display dpi.

refs: #1124, #291, #195
2021-10-07 19:26:22 -07:00
Wez Furlong
e25deaaed1 fonts: align emoji fonts with the primary font baseline
refs: #1203
2021-10-05 22:01:21 -07:00
Wez Furlong
4eef20320d search: auto-update when the pane content changes
refs: https://github.com/wez/wezterm/issues/1205
2021-10-05 20:17:45 -07:00
Wez Furlong
87ea33f2f8 partially revert ligature cursor fix
refs: #478
2021-10-05 19:46:36 -07:00
Wez Furlong
fae5435824 fix incorrect fg color when cursoring over ligatured glyph
More of a "fix"; we use some heuristics based on the bearing
and glyph width to figure out if a sequence looks like a funky
ligature that moves left to render the glyph.

This may be prone to false positives, but the consequences are low:
when we think a glyph is part of a ligature, then rather than using
the cursor_fg color (which is typically black, or close to invisible),
we retain the normal text fg color.

This way the portion of the glyph outside of the cursor retains its
foreground color, and just the cell containing the cursor may have
a slightly funky fg color in the case where the heuristic was bad.

closes: #478
2021-10-04 17:35:54 -07:00
Wez Furlong
3ab08107cf docs: fix typo in changelog 2021-10-03 10:46:25 -07:00
Wez Furlong
8da9196491 ssh: Host is space delimited, not comma delimited
closes: #1196
2021-10-03 08:09:04 -07:00
Wez Furlong
401719fb01 fonts: improve cap-height and use_cap_height_to_scale_fallback_fonts
We now compute the cap-height from the rasterized glyph data.

Moved the scaling action of use_cap_height_to_scale_fallback_fonts from
glyphcache into the font resolver: when enabled, and we have data
about the baseline font and the font being resolved, then the resolving
font will be scaled such that the cap-height of both fonts has the same
pixel size.

The effect of this is that `I` glyphs from both fonts should appear to
have the same height.

Added a row of `I`'s in differing styles at the bottom of styles.txt
to make this easier to visualize.

refs: #1189
2021-10-02 18:23:51 -07:00
Wez Furlong
d3c748e18f fonts: enable matching against bitmap strike sizes
This is to handle situations such as some versions of the Terminus
bitmap font, where the individual bitmap strike sizes are broken
out across multiple individual files.

Font matching now passes down the nominal pixel height based on
the current DPI and font scale factor, and will use that to select
the font file that has the closest pixel size.

Previously, it would be potentially undefined which of the Terminus
font files would be selected.

refs: https://github.com/wez/wezterm/issues/1189
2021-10-02 09:33:55 -07:00
Wez Furlong
ca89181098 bell: allow changing the cursor color when the bell is rung
I find this less distracting than both the audible and the default
background color flashing.
2021-09-29 08:02:34 -07:00
Wez Furlong
3566b82458 add wezterm connect --class option 2021-09-29 07:15:25 -07:00
Wez Furlong
72cb110b65 add audible_bell config option
This allows using the system beep sound, currently only on macos.

refs: #3
2021-09-26 12:55:19 -07:00
Wez Furlong
90dab9723f docs: changelog for #1151 2021-09-25 15:44:09 -07:00
Wez Furlong
0c1ad718d0 add visual bell
refs: #3
2021-09-25 12:40:22 -07:00
Wez Furlong
e287474973 fonts: fix a spacing issue for Goho OTB font
This font is a bit funky; the bitmap strikes are only 4px wide:

```
; ftdump gohufont.otb
There is 1 face in this file.

----- Face number: 0 -----

font name entries
   family:              Gohu GohuFont
   style:               Regular
   postscript:          UNAVAILABLE
   created:             1904-01-01
   modified:            1904-01-01
   revision:            1.00
   glyph count:         1694

font type entries
   FreeType driver:     truetype
   sfnt wrapped:        yes
   type:                fixed size
   direction:           horizontal
   fixed width:         no
   glyph names:         no

fixed size
     0: height 11, width 3
        size 11.000, x_ppem 11.000, y_ppem 11.000
     1: height 14, width 4
        size 14.000, x_ppem 14.000, y_ppem 14.000

charmaps (1)
   0: format  4, platform 3, encoding  1   language 0 (active)
```

but using that the cell size isn't right.

We draw from the metrics we compute via cell_metrics to get more
information; we don't get a valid height from that (just 0!), but
we do get the much more plausible width of 8 pixels.

So we take the max of the two techniques for figuring the metrics.

That appears to work out, and also doesn't appear to break emoji
fonts.

refs: #1165
2021-09-25 08:57:26 -07:00
Wez Furlong
f648d8a6a5 deps: Upgrade to freetype 2.11 2021-09-25 00:43:23 -07:00
Wez Furlong
2337c06c0f gui: new bell event for running lua when the bell is rung
This commit adjusts the the window event routing/queuing so that
a queued event can capture a pane_id other than the focused pane.

Since we only allow one queued instance of a given named event in a
window, a consequence of this is that multiple bell events coming
from different panes at the same time may race and the loser's
event will be dropped. We log a warning in that case.

refs: #3
2021-09-23 08:22:01 -07:00
Wez Furlong
b19162b995 docs: changelog for https://github.com/wez/wezterm/issues/1162
closes: #1162
2021-09-22 21:54:54 -07:00
Wez Furlong
0ee1f7529b fonts: Fix shaping metrics
This was a bit of a PITA to run down; the essence of the problem
was that the shaper was returning an x_advance of 0 for U+3000,
which caused wezterm's shaping layer to elide that glyph.

I eventually tracked down the x_advance to be the result of
scaling by an x_scale of 0, which in turn is the result of
harfbuzz not knowing the font size.

The critical portion of this diff is the line that advises
harfbuzz that the font has changed after we've applied the
font size.

The rest is just stuff to make it easier to debug and verify.

This:

```
printf "x\u3000x."
```

Now correctly renders on screen as "x  x".

fixes: #1161
2021-09-22 08:34:40 -07:00
Wez Furlong
1ec7c3843d docs: update incremental resize for #1133 wayland 2021-09-21 08:20:53 -07:00
Wez Furlong
2e12d3bf60 docs: changelog for #1144 2021-09-19 16:01:28 -07:00
Wez Furlong
b16f584866 deps: harfbuzz -> 3.0.0 2021-09-18 09:04:23 -07:00
Wez Furlong
82cf33e0ab .debs now provide x-terminal-emulator
refs: #1139
2021-09-13 08:36:58 -07:00
Wez Furlong
140d9fd345 fix font matching issue with .ttcs holding multiple families
refs: #1137
2021-09-12 13:31:21 -07:00
Wez Furlong
53eea54fed docs: changelog for #1132 2021-09-12 09:55:07 -07:00
Wez Furlong
c870c73dbe deps: update harfbuzz to 2.9.1 2021-09-09 09:01:42 -07:00
Wez Furlong
8282faf31f window: allow specifying window resize increments on macos and x11
This commit introduces a mechanism for specifying resize increments
for a window, and then arranges for the termwindow to set those
to match the current font cell metrics.

This should help to avoid cases where there is excess padding pixels
resulting from the window being slightly larger than computed number
of cells and the font metrics.
2021-09-08 22:57:42 -07:00
Wez Furlong
3e8e0aa7f4 docs: changelog for https://github.com/wez/wezterm/pull/1127 2021-09-08 17:47:20 -07:00
Wez Furlong
bd9b964106 docs: changelog for #1126 2021-09-08 17:40:25 -07:00
Wez Furlong
8eefe7a764 docs: changelog for #1074
closes: #1074
2021-09-08 09:43:19 -07:00
Wez Furlong
9fe11669fd docs: changelog for #1120 2021-09-08 09:34:49 -07:00
Wez Furlong
27153e1cea docs: changelog for #1122, #1123 2021-09-08 09:28:36 -07:00
Wez Furlong
aa61a6b065 gui: force cursor to be visible in copy mode
It appears as though kakoune hides the terminal cursor and renders
its own version of the cursor.

The hidden state was being picked up by the copymode overlay,
making it awkward to use.

This commit forces the cursor to be visible (and a block) when
copy mode is active.

closes: #1113
2021-09-06 19:51:20 -07:00
Wez Furlong
7da1971bad docs: changelog for #1111, #1112 2021-09-06 19:27:51 -07:00
Wez Furlong
86f0bae1db fonts: tidy up fontconfig charset acceleration
and add a changelog entry!

refs: #250
2021-09-06 11:05:16 -07:00
Wez Furlong
4d5a923cb4 docs: changelog for #947 2021-09-06 10:13:28 -07:00
Wez Furlong
311bd78902 Fix SU (scroll up) using default-blank cells
closes: https://github.com/wez/wezterm/issues/1102#
2021-09-04 17:35:33 -07:00
Wez Furlong
fea3a527dd Fixed invisible I-beam/underline cursor w/force_reverse_video_cursor
closes: https://github.com/wez/wezterm/issues/1076
2021-09-04 14:24:58 -07:00
Wez Furlong
4c8ccf8efc Add Multiple key assignment
refs: https://github.com/wez/wezterm/pull/1091
2021-09-04 13:01:34 -07:00
Wez Furlong
67e8bdc5c2 term: fix DCH removing cells instead of setting to current bg color
refs: #789
2021-09-03 16:21:15 -07:00
Wez Furlong
e9f1c319e7 docs: changelog for 1031
closes: https://github.com/wez/wezterm/issues/1031
2021-09-03 12:19:44 -07:00
Wez Furlong
bc4ed3735d Add SendKey key assignment
refs: https://github.com/wez/wezterm/pull/1091
2021-09-03 12:07:17 -07:00
Wez Furlong
8da1f676a8 ALT+ "function" keys incorrectly sent ESC prefixed sequences
closes: #892
2021-09-03 11:35:01 -07:00
Wez Furlong
da455cafa1 window: plumb get_appearance on x11/wayland systems
Not sure what happened here: presumably a borked merge or something
similar, but this commit allows `window:get_appearance` to return
the actual appearance value on X11.

Even though this plumbs the call through to Wayland, Wayland doesn't
provide an equivalent concept so still always return Light, as is
mentioned on our docs.

closes: #1098
2021-09-02 09:08:21 -07:00
Wez Furlong
f3e5c337fd docs: changelog for https://github.com/wez/wezterm/issues/1051
closes: #1051
2021-09-02 08:53:31 -07:00
Wez Furlong
3d227d27cc docs: changelog for https://github.com/wez/wezterm/pull/1096 2021-09-01 21:13:14 -07:00
Wez Furlong
af23d64e97 docs: changelog for #1083 2021-08-27 07:51:27 -07:00
Sandro Jäckel
6ed16441c0 Revert "docs: changelog for https://github.com/wez/wezterm/pull/1081"
This reverts commit 14e6f9c4a8.
2021-08-25 13:37:00 -07:00
Wez Furlong
14e6f9c4a8 docs: changelog for https://github.com/wez/wezterm/pull/1081 2021-08-25 09:42:31 -07:00
Wez Furlong
fc441e9879 Upgrade bundled harfbuzz library to 2.9.0 2021-08-23 21:59:16 -07:00