Wez Furlong
9dadffcf1e
fix compile for child waiter on !linux
2018-02-20 21:32:44 -08:00
Wez Furlong
e9e3e47b94
make fontconfig/freetype conditional
2018-02-20 20:55:03 -08:00
Wez Furlong
e2462ea16a
refactor rasterizer
2018-02-20 20:49:16 -08:00
Wez Furlong
999396bc45
separate out the fontconfig/freetype code
2018-02-20 20:20:37 -08:00
Wez Furlong
b35fc8a3b1
remove helper method
2018-02-20 19:58:47 -08:00
Wez Furlong
dd4c9d6683
refactor the font loading code
...
This is the first step towards making this code more system independent.
2018-02-20 19:53:50 -08:00
Wez Furlong
b66f93ad11
add non-linux sigchld waiter
2018-02-20 17:34:32 -08:00
Wez Furlong
a4b55ecffb
macos pty api has some mutable ptrs
2018-02-20 17:13:19 -08:00
Wez Furlong
e2529d1837
Move opengl code into its own module
2018-02-20 15:46:05 -08:00
Wez Furlong
4efef794fe
move Renderer to its own file
...
It is now independent of the X11 code
2018-02-20 15:43:42 -08:00
Wez Furlong
39a0b6c9fd
extract render code into Renderer class
2018-02-20 15:33:21 -08:00
Wez Furlong
e1cd44922f
move x11 code around
...
idea is to reduce the cfg attributes and make it easier to
split into system dependent renderers
2018-02-20 15:02:39 -08:00
Wez Furlong
5a99dd143c
move hbwrap into harfbuzz crate
2018-02-20 14:32:28 -08:00
Wez Furlong
fe1ae0b7eb
Be more particular about platform deps
2018-02-20 14:17:28 -08:00
Wez Furlong
e7d99024bb
build our own harfbuzz for broader compat
2018-02-20 12:33:30 -08:00
Wez Furlong
9a5e7999da
TODONE
2018-02-20 08:13:36 -08:00
Wez Furlong
9da069e1e9
clean up atlas api
...
We now bubble up an error if we ran out of texture space.
Previously we'd allocate a new texture but that wouldn't help anyone.
I've bumped up the texture size by default, too.
Longer term we should catch this, blow the font cache, cancel the
pending render and re-render.
2018-02-20 08:09:12 -08:00
Wez Furlong
e6f42987ca
remove another unused crate
2018-02-20 07:41:19 -08:00
Wez Furlong
5ff473872d
Eliminate the third draw call
...
We can consolidate the underline/strike glyph rendering with
the background layer pass.
2018-02-19 22:02:27 -08:00
Wez Furlong
279b2018fd
Render cursor and selection for resized lines
...
If the user enlarges the terminal we can have regions of the vertex
buffer that have colors that default to alpha channel 0. This is
normally fine but breaks rendering of the cursor and the selection;
those attributes are out of band from the normal cell attributes,
especially for whitespace cells, so we need to handle those in
the degenerate case at the end of a line render.
Refactor the code that computes the cursor and selection colors
so that we can call it and use it in both places.
2018-02-19 21:29:27 -08:00
Wez Furlong
d55d5855a5
set CLIPBOARD as well as PRIMARY selection when selecting
2018-02-19 20:53:12 -08:00
Wez Furlong
966eb2ce4c
Don't loop to read from pty
...
We don't need to be greedy in handling this read. It is important
not to for example when a lot of data is being written to the pty
we don't want that to starve the gui event handler and block sending
an interrupt signal.
2018-02-19 07:56:33 -08:00
Wez Furlong
a0faebad8b
Clear some rendering artifacts from the rhs of the screen
...
These would get left behind after making the window wider
and then switching between alt screen and the main screen.
2018-02-19 00:15:11 -08:00
Wez Furlong
52f6e3c0bd
tweak the underline position
2018-02-18 23:53:54 -08:00
Wez Furlong
bc2c77aa1c
fixup alpha for tinted colors
...
Needed to de-pre-multiply(!) the color channels by the alpha to avoid
them getting too dark.
2018-02-18 23:48:21 -08:00
Wez Furlong
9bc0eee1e2
Re-enable underlining of whitespace
...
This was a hangover from an earlier iteration and isn't needed any more.
2018-02-18 23:08:49 -08:00
Wez Furlong
450ed0e82c
don't explode when scrolling back
2018-02-18 23:04:11 -08:00
Wez Furlong
e87f129ded
We now do a better job at rendering dejavusansmono
...
The descender in that font seems bad, so guestimate something that works
better for us.
2018-02-18 21:59:28 -08:00
Wez Furlong
8afbcc8ee0
clear adjust for whitespace glyphs
2018-02-18 20:37:13 -08:00
Wez Furlong
4818cdb838
improve font rendering by reducing hinting level
...
and using a more robust color multiplication function.
2018-02-18 20:30:53 -08:00
Wez Furlong
69278e8fde
whoops, fixup width calc for single width glyphs
2018-02-18 17:53:39 -08:00
Wez Furlong
fa0549b76e
add some more comments
...
and back out the get_all flag that was added as a temp workaround
in the earlier stages of adding opengl support.
2018-02-18 17:21:02 -08:00
Wez Furlong
3ccb0c24ef
Add third pass draw for underline/strikethrough rendering
2018-02-18 17:12:53 -08:00
Wez Furlong
f51b99cb73
remove some more dead bits and plumb underline/strike into shader
2018-02-18 14:52:10 -08:00
Wez Furlong
a1e5a17e94
remove some dead code
2018-02-18 14:48:24 -08:00
Wez Furlong
6f6622c659
pass has_color flag through to fragment shader
2018-02-18 14:22:43 -08:00
Wez Furlong
8d6950f586
Do a better job at rendering double wide glyphs
...
Color emoji look a bit jagged so we may have a rounding problem
for those. Will revisit them later.
2018-02-18 14:17:31 -08:00
Wez Furlong
a4c45fa321
use a single big vertex buffer
2018-02-18 11:31:00 -08:00
Wez Furlong
4acfd82e87
Default::default for Vertex & Point
2018-02-17 22:17:17 -08:00
Wez Furlong
6e3eb9747a
use texture atlas
2018-02-17 21:34:01 -08:00
Wez Furlong
1607ba4443
Add untested code for managing a texture atlas
2018-02-17 20:37:07 -08:00
Wez Furlong
de700e0207
make it very slightly cheaper to enumerate the screen lines
2018-02-17 15:04:48 -08:00
Wez Furlong
f8b596bd7c
remove more now-dead code
2018-02-17 14:02:02 -08:00
Wez Furlong
878bc4e082
update underline/strike rendering to opengl
2018-02-17 13:50:55 -08:00
Wez Furlong
d86f7ff2df
remove unused bits
2018-02-17 12:18:29 -08:00
Wez Furlong
2b2e443c7b
fix glyph y scale for color emoji
2018-02-17 12:17:36 -08:00
Wez Furlong
98c66b1919
remove unused variables
2018-02-17 12:00:29 -08:00
Wez Furlong
261a6cb6c6
remove some dead xproto code from xgfx
2018-02-17 12:00:13 -08:00
Wez Furlong
220e73e528
clean up more of the rendering
...
We can now render bg colors, selection, cursor, and the text has
reasonable proportions, and coloring.
bright cyan on blue has some black AA artifacts that I need to
investigate.
2018-02-17 11:53:54 -08:00
Wez Furlong
b8eb6dbedc
make color -> uniform conversion more ergonomic
2018-02-17 08:25:59 -08:00