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

1609 Commits

Author SHA1 Message Date
Wez Furlong
17101b182e fix build on linux 2019-12-09 00:50:19 -08:00
Wez Furlong
b5a59a18fa fonts: extract the shaper concept 2019-12-09 00:06:47 -08:00
Wez Furlong
41d10811a6 fonts: break out the rasterizer concept 2019-12-08 23:27:10 -08:00
Wez Furlong
6f867ac3e2 fonts: start breaking out the loader/locator concept 2019-12-08 22:48:47 -08:00
Wez Furlong
151a915128 Improve FontKit rendering, but it is still bad
I don't think font-kit has enough data available for to make things
work the way we're used to.  In addition, the implementation of
the loader for core text has a lot of TODO's.

The state of the FontKit variant is that it basically renders glyphs
and they are aligned to the same baseline, but both the vert and
horz metrics are off; for example, `-` doesn't render.  The glyphs
are also under-sized.
2019-12-08 21:35:37 -08:00
Wez Furlong
ab86eb1c75 font-kit: enable its use on macos
FontKit is still broken, but FontKitAndFreeType works
2019-12-08 17:51:01 -08:00
Wez Furlong
55f2016683 fix subtraction underflow 2019-12-08 17:49:27 -08:00
Wez Furlong
6ea837fc14 TODONE 2019-12-08 16:41:28 -08:00
Wez Furlong
1e9d3571ba font-kit: add font_dirs configuration option
This is another option to help with the portable wezterm on a flash
drive use case.

When the font system is set to FontKitAndFreeType, the set of
directories specified by the `font_dirs` configuration option will
be scanned for fonts and used as a source for fonts.

In addition, any relative paths in the the `font_dirs` list will
be expanded relative to the configuration file path.

That allows deploying the following set of files to the root of
a flash drive:

* wezterm.exe
* wezterm.toml
* fonts/myfont.ttf

and with this config snippet:

```
font_system = "FontKitAndFreeType"
font_dir = ["fonts"]
```

wezterm will now consider myfont.ttf when loading fonts.

Refs: https://github.com/wez/wezterm/issues/73
2019-12-08 16:34:17 -08:00
Wez Furlong
8ae136e616 fonts: allow using font-kit as a source for fonts
This commit adds two new font system variants that are currently
implemented only on Windows:

* FontKit - uses fontkit both for font discovery and rasterizing
* FontKitAndFreeType - uses fontkit for font discovery but freetype
  for rasterizing

To a certain extent, FontKitAndFreeType obsoletes FontLoaderAndFreeType
and I'll be looking at removing it once I can test the build on macOS.

The FontKit impl has bad metrics and also crashes during shaping
on Windows, so it's not ready to be used by default.
2019-12-08 16:02:04 -08:00
Wez Furlong
b47cd72853 Windows: show toast notification if config reload encounters error
This gives us a way to show notifs on windows, which is a feature
that isn't supported by the notify-rust crate.
2019-12-08 11:14:02 -08:00
Wez Furlong
cdfd77902a update ssh2 dep 2019-12-08 10:43:55 -08:00
Wez Furlong
500b880b97 load config from executable dir first on Windows
This is to support the portable-tools use case for roaming admins.

Refs: https://github.com/wez/wezterm/issues/73
2019-12-07 20:51:30 -08:00
Jeremy Fitzhardinge
0558662813 Convert chit-chat into info
I assume it was being printed as error from a mass conversion to the logging framework.
2019-12-06 15:11:42 -08:00
Jeremy Fitzhardinge
0ba11a8bbd Clean up FontAttributes bold and italic
There doesn't seem to be a need for a tristate Option<bool>, since we always treat unset as false.
2019-12-06 15:11:42 -08:00
Jeremy Fitzhardinge
b751c6590b Small cleanup in fontconfigandfreetype 2019-12-06 15:11:42 -08:00
Jeremy Fitzhardinge
6420a47ad2 font: add Debug implementation for Pattern and FontSet 2019-12-06 15:11:42 -08:00
Wez Furlong
5b6bad2c51 downrev notify-rust dependency
SOmething on the CI doesn't like it and it looks like a problem
with that alpha version, so let's go back to their stable rev.
2019-12-04 20:40:32 -08:00
Wez Furlong
66861ff8f7 improve handling of deleted config files in the reloader
The NoticeXXX variants are emitted at the trigger point, but
we should wait for the debounced XXX variants instead.  We
were doing this for write but not for delete.  This should
improve the chances that we'll pick up a new version of a
config file.
2019-12-04 20:38:29 -08:00
Wez Furlong
598c2d8c26 notifications: set the resident hint
Even with setting this, I'm 0 for 4 different systems in having the
notifications actually stay on the screen until dismissed.

This was successful at displaying a notification on the pixelbook
desktop though, so that's 1/3 linux systems that have had success.
2019-12-04 19:55:43 -08:00
Wez Furlong
d4ab211190 PendingMouse and CopyAndPaste now impl Debug 2019-12-04 19:45:13 -08:00
Wez Furlong
09840dd011 notifications: fixup formatting and add to get-deps script 2019-12-04 18:33:36 -08:00
Wez Furlong
c547b03b8b add basic notifications if the config is broken during reload 2019-12-04 18:26:47 -08:00
Wez Furlong
fc53b3969a rustfmt 2019-12-01 15:24:03 -08:00
Wez Furlong
0f28ab8243 docs: update rust version info and build instructions 2019-12-01 15:23:08 -08:00
Wez Furlong
d368c0036b fixup ubuntu installation instructions 2019-12-01 15:18:08 -08:00
Wez Furlong
b3f23bbf4a fixup some build and test warnings 2019-12-01 13:35:34 -08:00
Wez Furlong
901dc9c395 re-structure clipboard handling for mux
The wayland changes rendered clipboard handling for remote multiplexers
broken, and this commit makes it work again.

It removes the clipboard concept from the the TerminalHost and
keeps it separated as the term::Clipboard concept.

The muxer now has plumbing for passing the Clipboard to its idea
of Windows and Tabs and this is hooked up at window creation and
domain attach time.
2019-12-01 13:31:12 -08:00
Wez Furlong
7d510f4f7e reduce log verbosity for compute vertices 2019-12-01 11:43:22 -08:00
Wez Furlong
420903662d reduce verbosity for config reload messages 2019-12-01 11:40:55 -08:00
Wez Furlong
dfe98f46f9 ssh: disable nagle 2019-12-01 11:25:04 -08:00
Wez Furlong
0edceea972 fix compilation on macos 2019-12-01 10:16:14 -08:00
Wez Furlong
3059488753 window: wayland: round up for pixel->surface conversion 2019-12-01 09:32:35 -08:00
Wez Furlong
d53553491a window: wayland: tidy up some scaling code 2019-12-01 09:26:46 -08:00
Wez Furlong
f15f556054 wayland: add config option to avoid using it
Just in case!
2019-12-01 07:56:41 -08:00
Wez Furlong
58cb696593 make pty size consistent with tab bar dimensions
This fixes up a series of "we're confused about the screen size"
messages that showed up on startup.
2019-11-30 23:22:37 -08:00
Wez Furlong
68f819e737 avoid resizing terminal tab when scaling changes 2019-11-30 22:03:57 -08:00
Wez Furlong
70f09ef1b4 fix window size calculation when scaling changes
I noticed that we were relatively undersized for newly created
windows; there were two problems:

1. We weren't propagating the old rows and cols counts through
   to the speculative resize.
2. The speculative resize wasn't implemented on wayland, and
   needs a surprising amout of work to actually make the resize
   take effect.
2019-11-30 21:27:03 -08:00
Wez Furlong
1960655915 window: wayland: fix segfault on shutdown 2019-11-30 17:35:58 -08:00
Wez Furlong
c1fc335115 window: wayland: implement mouse cursor changing 2019-11-30 17:08:53 -08:00
Wez Furlong
fb54329f6b window: wayland: tidy up some debugging 2019-11-30 13:32:45 -08:00
Wez Furlong
18d9fabe9f window: wayland: don't lose keystrokes after clicking titlebar 2019-11-30 13:30:37 -08:00
Wez Furlong
ea61e8c57d wayland: don't allow clicks in titlebar to go to tabbar 2019-11-30 13:21:37 -08:00
Wez Furlong
317d3105bc window: wayland: fix routing of point and data events
Like the keyboard, the point and data related events are seat
centric and we need to manage our own routing to windows.
2019-11-30 13:05:19 -08:00
Wez Furlong
29a6c62b6c window: wayland: fix routing of keyboard events
The seat is a global thing, so we need to track the active
surface and route events to the appropriate window.
2019-11-30 10:00:34 -08:00
Wez Furlong
2d6d54bfab window: wayland: scale scroll values by dpi factor
Otherwise it feels eg: twice as hard to scroll when the factor is
set to 2x.
2019-11-30 07:52:00 -08:00
Wez Furlong
718b1fb535 window: wayland: make dpi values for sw and gl the same
Make the numbers consistent with each other
2019-11-30 07:29:24 -08:00
Wez Furlong
9d1b253379 window: wayland: more clearly distinguish inactive titlebar 2019-11-29 22:18:16 -08:00
Wez Furlong
1f11c82751 window: wayland: improve mouse event processing latency
Use a similar queueing technique as with the window size events
2019-11-29 22:03:36 -08:00
Wez Furlong
9085f118d5 window: tidy up some debug prints around selection 2019-11-29 19:16:37 -08:00