Commit Graph
351 Commits
Author SHA1 Message Date
Wez Furlong b0f7a9d797 inching towards sane emoji rendering with glutin frontend 2019-02-20 17:44:35 -08:00
Wez Furlong e976f1872a ugh, unbreak shifted letters and numbers
Hopefully a happy medium in the short term.  Need a good story around
IME/international input.
2019-02-20 10:17:37 -08:00
Wez Furlong 9fa376d2a3 Add command line override for font system 2019-02-20 09:01:36 -08:00
Wez Furlong 8c821bc9e6 Allow specifying the gui system via the cli 2019-02-20 08:53:59 -08:00
Wez Furlong b0c2704118 clap -> structopt
This looks like it will help with some enum parsing
2019-02-20 07:54:31 -08:00
Wez Furlong 50a882874a ensure we're using a current context when querying surface dimenions
https://github.com/wez/wezterm/issues/19 is a case where a user
runs in this; it seems particular to their opengl implementation
so I can't reproduce it locally.

@Lompik suggests that this resolves the issue, and it doesn't seem
to hurt, so let's apply it!
2019-02-20 07:05:35 -08:00
Wez Furlong 36be587bb9 fixup glutin keypress dispatching
on macos we were receiving unicode text in addition to the scan codes.
This is mostly undesirable, except when it's not
(see https://github.com/wez/wezterm/issues/18)

This diff ignores the unicode input stream and manually decodes
the keys from an english keyboard.
2019-02-20 01:03:08 -08:00
Wez Furlong 99ff395a9a restore spawning windows on x11
compiled but untested
2019-02-19 23:55:29 -08:00
Wez Furlong 314f7cc103 Allow runtime selection of gui system
This allows choosing between X11 and Glutin, which simplifies some
conditional code and allows some short term flexibility on unix
systems.  However, what it really opens up is running a future
headless server mode (think: tmux).

This change comes with the cost of temporarily breaking creating
a new window on x11.
2019-02-19 23:39:13 -08:00
Wez Furlong feb0af7ca8 traitify bits of futurecore 2019-02-19 22:57:39 -08:00
Wez Furlong ee06d34b18 extract some gui running code
This breaks the x11 flavor of the build for the moment.
2019-02-19 21:57:12 -08:00
Wez Furlong 4ab73ebb2c start to allow runtime gui frontend changes 2019-02-19 21:09:55 -08:00
Wez Furlong c04c3fdbac move pty code into its own deeper module 2019-02-19 20:43:28 -08:00
Wez Furlong 3dcd001a5a suppress annoying unicode after arrow presses on macos 2019-02-19 13:57:45 -08:00
Wez Furlong 2fc62bbf1b fixup compilation for x11 2019-02-19 07:53:54 -08:00
Wez Furlong b905c112e2 add plumbing for spawning windows+tabs in glutin 2019-02-19 07:51:49 -08:00
Wez Furlong 28cba72472 improve throughput and responsiveness of glutin based loop 2019-02-19 07:04:00 -08:00
Wez Furlong ad77709506 fix fault on shutdown when using fontloader+freetype 2019-02-19 06:38:21 -08:00
Wez Furlong 6ffe4a3044 prefer freetype over rusttype 2019-02-18 23:31:22 -08:00
Wez Furlong f21bc5aa01 fixup macos for 2018 edition 2019-02-18 23:29:11 -08:00
Wez Furlong 7e38628486 update termwiz to 2018 edition 2019-02-18 23:26:41 -08:00
Wez Furlong 571562351d migrate wezterm to 2018 edition 2019-02-18 23:17:33 -08:00
Wez Furlong 4c39faffbe use the open crate for url clicking 2019-02-18 22:57:40 -08:00
Wez Furlong 03f6f1272b fixup macos compilation 2019-02-18 22:22:43 -08:00
Wez Furlong 9009daa1db adjust shape for non-harfbuzz freetype
This looks better on windows
2019-02-18 22:11:43 -08:00
Wez Furlong 3dfaf7111f allow runtime selection of font loader/renderer
This cleans up the rats nest of conditional build bits
and allows easier testing and comparison of the systems.
2019-02-18 22:02:31 -08:00
Wez Furlong 79fb3e206b use fontload + freetype on windows 2019-02-18 21:09:54 -08:00
Wez Furlong 1039e013c1 extract fontloader loader from fontloader_and_rusttype 2019-02-18 13:28:25 -08:00
Wez Furlong 9de24a75ed split rusttype font from fontloader 2019-02-18 13:13:36 -08:00
Wez Furlong e3b3fa58fc add ft memory face loader 2019-02-18 12:56:41 -08:00
Wez Furlong ad55946f07 extract freetype font impl to its own module 2019-02-18 12:52:31 -08:00
Wez Furlong a6fd1b000d teach fontconfig loader about new font attributes 2019-02-18 11:42:08 -08:00
Wez Furlong 4a78b5a811 fixup build on win and linux 2019-02-18 11:21:26 -08:00
Wez Furlong 418aa1d458 start teaching rusttype about fallback 2019-02-18 10:22:31 -08:00
Wez Furlong 2834705d47 improve error message when rusttype fails to load a font 2019-02-18 09:04:21 -08:00
Wez Furlong 018418a0c2 introduce a FontAttributes type for the config
This has a little more structure than the linux specfic
fontconfig_pattern and can be used in a future diff to
derive a fontconfig_pattern.

This is a breaking change for the config file format.
2019-02-18 09:04:17 -08:00
Wez Furlong 4aa1e65505 upgrade glium+glutin to get macos rendering in the center of the window
This makes macos basically usable!
2019-02-18 02:37:05 -08:00
Wez Furlong dc8af0c2bc basic, comical looking macos support via glium/glutin 2019-02-18 00:34:02 -08:00
Wez Furlong d69c718a73 use the clipboard crate
This removes some tricksy code in favor of a third party crate,
which unlocks the clipboard on windows.  I'm not sure how well
this will work on the pure x11 impl yet.
2019-02-17 18:49:22 -08:00
Wez Furlong 3a4673f22c increase default font size a little 2019-02-17 17:58:57 -08:00
Wez Furlong 254b8ab96b rustfmt 2019-02-17 17:45:54 -08:00
Wez Furlong 3bec16a4b9 tweak text shader
@Lompik reports that there are artifacts with certain color combos
and proposes simplifying the color blending by just copying the rgb
channel.

This does look better than what we're currently doing so I see no
reason not to adopt this for now, and we can revisit it later.

Refs: https://github.com/wez/wezterm/issues/17
2019-02-17 17:30:16 -08:00
Wez Furlong 133ccc3d0a fixup shader selection for glutin vs. GLES 2019-02-17 17:13:11 -08:00
Wez Furlong 02b684366e main now returns Result
More recent rust allows returning Result so we can eliminate
our little wrapper
2019-02-17 16:51:54 -08:00
Wez Furlong 3302b3bb64 be explicit about shaders outputting srgb
This helps correct the color brightness on windows
2019-02-17 16:42:21 -08:00
Wez Furlong a8b899e25d simplify glium init
The srgb and fallback stuff doesn't seem to make a difference, so
use the simplest form of the init.
2019-02-17 16:29:06 -08:00
Wez Furlong 89c0acf1e3 fixup some warnings, remove dead code 2019-02-17 16:24:55 -08:00
Wez Furlong 7f0727a512 partial revert of 4098931e62
Back out the scaling calculation portion of
4098931e62, which didn't look right
with italic operator mono and also seemed to mess with glyphs
rendered via rusttype.
2019-02-17 15:41:37 -08:00
Wez Furlong 124b98cc05 fix flakey spawning on windows 2019-02-17 15:32:37 -08:00
Wez Furlong d2372058ee use comspec to locate the cli shell on windows 2019-02-17 14:46:20 -08:00