1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-28 01:06:37 +03:00
Commit Graph

5135 Commits

Author SHA1 Message Date
Wez Furlong
39babc1f1e fix overflow calc
refs: #1627
2022-02-07 07:49:51 -07:00
Wez Furlong
7a5956d3b8 gui: blinking cursor now eases rather binary blinks
Also: I recently broke force_reverse_video_cursor with the recent
glyph rendering fixes; this commit restores that functionality.
2022-02-06 22:09:52 -07:00
Wez Furlong
435ff1e93b deps: image -> 0.24 2022-02-06 18:51:32 -07:00
Wez Furlong
c4009d8e1d deps: shell-words -> 1.1.0 2022-02-06 18:32:10 -07:00
Wez Furlong
842e4800b5 blinking text is now eased between bg and fg color 2022-02-06 18:28:45 -07:00
Wez Furlong
7b4c3d0397 refactor: visual bell easing to a helper 2022-02-06 18:28:45 -07:00
Wez Furlong
75e785e01e allow using CSS style color specs in the config
This change also allows removing the dep on the palette crate,
which I found to be difficult to use (API changed often, and relied
on a lot of `.into` that was hard to follow and reconcile across
upgrades).  We already pulled in the csscolorparse crate as an indirect
dep of colorgrad, so we can replace the color conversion we need for
sixel with that crate while we're in here.

refs: #1615
2022-02-06 08:23:26 -07:00
Wez Furlong
d1ea39af7a deps: cargo update 2022-02-06 07:46:12 -07:00
Wez Furlong
7956e71b34 docs: mention bidi in changelog 2022-02-06 07:37:01 -07:00
Wez Furlong
2fedc0ca21 docs: changelog for https://github.com/wez/wezterm/issues/1615 2022-02-06 07:29:33 -07:00
Wez Furlong
52f3d6c0e5 gui: clarify code, no functional change 2022-02-06 07:29:07 -07:00
Wez Furlong
f89f2b5248 term: reset to single width line when clearing a line
Previously overlooked because we didn't render or otherwise
change behavior: after running vttest and running ls, some
lines still had double width/height set.

This ensures that we remove that attribute when clearing
the screen.
2022-02-06 07:10:31 -07:00
Wez Furlong
1b63b4b7c9 deps: harfbuzz -> 3.3.2 2022-02-06 06:44:59 -07:00
Wez Furlong
2ccf2378fd fix vertical positioning for custom block glyphs
refs: https://github.com/wez/wezterm/issues/1621
2022-02-06 06:19:49 -07:00
Wez Furlong
d0a7fc9fd3 gui: take a run at rendering double-width/height lines
This is using the existing attributes on the lines and rendering
the lines with doubled dimensions.

Selection on double width lines is a bit wonky because we don't
know how to translate the column position correctly.
2022-02-05 21:28:18 -07:00
Wez Furlong
9c83e27172 remove grey_out method from palette
This was used by the mux client when the session is tardy.
I've heard feedback that the greying out is distracting and not
especially useful, so I don't think this is any great loss.
2022-02-05 17:01:31 -07:00
Wez Furlong
1f6764f792 fixup underlines
bd47979292 made underlines only as
wide as the glyph texture.

This commit renders them under the width of the cluster region.
2022-02-05 16:29:04 -07:00
Wez Furlong
8cb74c62d2 allow setting selection colors with alpha values
This commit allows the following configuration:

```
wezterm -n --config 'colors = { selection_fg = "clear", selection_bg = "rgba:50% 50% 50% 50%" }'
```

which sets the selection_bg to fully transparent, and selection_bg to
50% transparent gray.

When selection_fg is fully transparent we'll use the normal fg color.

When selection_bg is partially (or fully!) transparent, it will be
alpha blended over the current cell background color.

To support this, the config file will now accept rgba colors specified
as 4 whitespace delimited numeric values. If a value ends with `%` it
is interpreted as a number in the range 0-100.  Otherwise, it is
interpreted as a number in the range 0-255.  The 4 values are
red, green, blue, alpha.

At this time, only the selection_fg and selection_bg settings accept
alpha values.

refs: #1615
2022-02-05 15:17:22 -07:00
Wez Furlong
240026de48 refactor: move color parsing into wezerm-color-types crate
Resolves a little bit of the awkward duplication of color types
between some of the crates by factoring them a little bit better.

This is prep for allowing specifying alpha for some colors
in the config.
2022-02-05 13:59:54 -07:00
Wez Furlong
bd47979292 revise ligature render / cursor intersection
This puts to final rest #478, wherein ligatured glyphs that span
cells would render portions of the glyph with the wrong fg color,
where wrong was usually the bg color and cause the glyph to turn
invisible when cursoring through the ligature.

The approach used here is to divide the glyph into 7 discrete strips
where each strip either intersects with the cursor, the selection, or
neither. That allows us to render each strip with the appropriate
foreground color.

This change simplifies some of the logic and allows some other code
to be removed, so that feels good!

As is tradition with these renderer changes, there's a good chance that
I overlooked something in testing and that the metrics or alignment
might be slightly off for some font/text combo.  Let's see how this
goes!

refs: #784
refs: #478
refs: #1617
2022-02-05 10:49:49 -07:00
Wez Furlong
1e32ccbd2f shaping: fix an issue where we'd lose combining marks like U+20d7
For a sequence like `e U+20d7` the intent is to render the `e` with
a vector arrow over the top.

This is typically implemented by fonts as an `e` followed by the
vector glyph (or vice versa), where either one of those may have
a zero advance so that the two elements are combined.

There were two problems here:

* During shaping we'd see the zero advance and assume that the entry
  was useless and skip it
* During rendering, if we didn't think it had any cell width, we'd
  not render it

Cursoring through that particular sequence can hide the vector
mark if the cursor is set to the default block cursor due to annoyances
in how the block cursor is rendered (it changes the fg color to match
the bg, but for elements outside where we think the cursor is, this
makes those elements invisible).

refs: https://github.com/wez/wezterm/issues/1617
2022-02-05 06:19:25 -07:00
Wez Furlong
3e2f5263bc centralize image data size sanity checking, add to kitty
refs: https://github.com/wez/wezterm/issues/1031#issuecomment-1030056063
2022-02-04 08:58:23 -07:00
Wez Furlong
092663a332 slightly simplify compute_cell_fg_bg
Reduce the number of parameters passed down into it
2022-02-04 08:38:16 -07:00
Wez Furlong
f4c3eab3f8 remove some dead code 2022-02-04 07:54:47 -07:00
Wez Furlong
cb1f35a7f9 remove experimental_shape_post_processing option
This has been obsoleted by the work in 9de0e1ac90
2022-02-04 07:43:01 -07:00
Wez Furlong
794113807b docs: changelog for https://github.com/wez/wezterm/issues/1601
closes: https://github.com/wez/wezterm/issues/1601
2022-02-03 23:09:40 -07:00
Wez Furlong
7577eb327f docs: changelog for https://github.com/wez/wezterm/issues/1610 2022-02-03 23:08:22 -07:00
Wez Furlong
c3234b61d7 nerdfonts: re-order numerics so that 10 comes after 1 etc. 2022-02-03 09:08:39 -07:00
Wez Furlong
038938479f docs: embed nerd fonts symbols on the nerdfonts page 2022-02-03 08:19:51 -07:00
Wez Furlong
024261672a maybe really fix the alignment issues!
refs: #1570
refs: #1607
refs: #1563
2022-02-02 08:46:10 -07:00
Wez Furlong
6368198b4f refine emoji-presentation script
refs: #1607
2022-02-02 06:57:08 -07:00
Wez Furlong
23d1ad5861 docs: add centos9 to downloads section 2022-02-02 06:42:03 -07:00
Wez Furlong
98d2400fba ci: more adjustments for centos9
Avoid depending on lsb_release, which is no longer shipped in
centos9.
2022-02-01 22:27:22 -07:00
Wez Furlong
7089954049 ci: update for centos9 2022-02-01 22:19:45 -07:00
Wez Furlong
519cf58526 avoid OOM with unreasonable sixel data
refs: https://github.com/wez/wezterm/issues/1610
2022-02-01 22:16:02 -07:00
Wez Furlong
9de0e1ac90 shaping: improve glyph cell width math
This is a more robust approach; we make a separate pass to figure
out information about the (harfbuzz) cluster for a sequence of glyphs,
and then map that sequence back to the original cell sequence, and
from there compute the total cell width for the run, then distribute
the glyphs across the run.

This should yield more sane results for bidi.

Fixup the x-position math; it was still wonky despite the
efforts in 5f2c905db8 and
af92265ffb

refs: #1570
refs: #1607
refs: #1563
2022-02-01 22:03:50 -07:00
Wez Furlong
5c9ae7860f ci: centos9 has curl-minimal preinstalled which conflicts with curl
so just install curl-minimal
2022-02-01 14:34:21 -07:00
Wez Furlong
64d12d4500 ci: there is no powertools repo in centos9 2022-02-01 14:30:55 -07:00
Wez Furlong
5caab935ae ci: add centos9 2022-02-01 14:18:57 -07:00
Wez Furlong
e2903cfa5b Revert "update docs to mark EOL for CentOS 8"
This reverts commit 832c8ad053.

We have centos8 back in the CI again
2022-02-01 13:12:22 -07:00
Wez Furlong
e409968fb1 ci: centos8 can be found on quay.io 2022-02-01 12:07:51 -07:00
Wez Furlong
5f2c905db8 shaping: feed presentation width from the terminal through to glyph info
This allows unicode_version to be respected again when rendering.

The updated emoji-presentation.sh script now highlights this slightly
better by putting `.` characters after the emoji; unicode version 14
emoji presentation will show the `.` in the 3rd column, while earlier
versions will show it in the 2nd column for glyphs that are sensitive
to the version.

refs: #1607
refs: #1563
2022-02-01 09:23:57 -07:00
Wez Furlong
832c8ad053 update docs to mark EOL for CentOS 8 2022-02-01 08:41:20 -07:00
Wez Furlong
35e97a5c78 centos 8: RIP
There's no obvious successor that I trust to build this on GH actions,
so remove it from CI.
2022-02-01 08:38:03 -07:00
Wez Furlong
af92265ffb render: fix regression with emoji width rendering
refs: #1607
refs: #1609
2022-02-01 08:25:05 -07:00
Wez Furlong
81f2c1cda1 update emoji presentation test script
refs: #1607
2022-02-01 08:04:16 -07:00
Wez Furlong
fb1350492c Revert "ci: migrate centos:8 images to stream"
This reverts commit 6fe60d56fd.

It didn't work out, and I'd rather it be broken the original way
than the other way :-p
2022-01-31 21:44:48 -07:00
Wez Furlong
6fe60d56fd ci: migrate centos:8 images to stream
The centos8 builds have been failing today, and it appears to
be because https://www.centos.org/centos-linux-eol/ happened
about 3 years early and the URLs in the image are hard-broken.

https://forums.centos.org/viewtopic.php?f=54&t=78708 has some
info on re-pointing them to a vault subdomain.

The "right" thing to do is to migrate to centos 8 stream, but
I don't see a centos stream docker image from centos.

This commit attempts the manual migration steps to stream.

Let's see how this goes.
2022-01-31 21:23:52 -07:00
Wez Furlong
7d8819b8d6 freetype: regenerate ffi bindings 2022-01-31 20:39:05 -07:00
Wez Furlong
40eef5b5dd harfbuzz: regenerate ffi bindings 2022-01-31 20:35:12 -07:00