Mitchell Hashimoto
662b656218
implement LRU row GPU cell caching
2022-09-12 11:28:47 -07:00
Mitchell Hashimoto
97aef76501
avoid large shaper buffer allocation on every frame
2022-09-07 20:27:36 -07:00
Mitchell Hashimoto
98dff5a163
better handling of combination characters
2022-09-07 20:10:06 -07:00
Mitchell Hashimoto
e326bc4921
fonts are presentation format aware (text vs emoji)
2022-09-06 13:30:29 -07:00
Mitchell Hashimoto
90d250a3ba
Rebase
2022-09-05 11:41:40 -07:00
Mitchell Hashimoto
480d262bc1
Calculate grid_width properly, use that instead of wide mask in shader
2022-09-05 11:38:53 -07:00
Mitchell Hashimoto
3231b84927
Ligatures
...
This introduces a naive first pass at integrating ligatures. The basic
ligatures (such as "==" in some fonts) work great. Skin-toned emoji are
struggling a bit.
This isn't the most performant way to do this, either, and I plan on
improving that.
2022-09-05 11:38:52 -07:00
Mitchell Hashimoto
77c8ec0a20
the big screen switchover
2022-09-01 00:58:47 -07:00
Mitchell Hashimoto
2cab94e64d
move cell metrics calculation out into src/font
2022-08-29 11:44:05 -07:00
Mitchell Hashimoto
bd9c048c02
use new font.GroupCache, remove unused font structs
2022-08-29 11:34:21 -07:00
Mitchell Hashimoto
985b329c8a
src/font: change Face to require font to init
2022-08-29 08:48:40 -07:00
Mitchell Hashimoto
f1abca51f7
convert src/font to use new pkg/freetype
2022-08-28 22:22:16 -07:00
Mitchell Hashimoto
dc6fc5c1c3
implement faint colors (SGR 2)
2022-08-26 11:13:34 -07:00
Mitchell Hashimoto
65df657b4e
make cell attrs bools instead of u1s
2022-08-26 11:09:48 -07:00
Mitchell Hashimoto
9601920b4d
font size is now in font points, determine size based on window DPI
2022-08-25 12:29:28 -07:00
Mitchell Hashimoto
f4b1783c1f
atlas tracks modified/resize state, reallocate on GPU if resized
2022-08-24 12:41:31 -07:00
Mitchell Hashimoto
561bbca053
don't render wide char trailers
2022-08-20 17:17:13 -07:00
Mitchell Hashimoto
8a1d7070b3
render wide chars
2022-08-20 16:49:55 -07:00
Mitchell Hashimoto
43c61f57ef
font FallbackSet for looking up in fallback TTFs (emoji)
2022-08-20 10:37:12 -07:00
Mitchell Hashimoto
22ed65a818
really hacked in emoji support, time to clean it up
2022-08-20 10:37:11 -07:00
Mitchell Hashimoto
742dd010eb
Texture atlas supports variable color depth, not just greyscale
2022-08-19 14:37:22 -07:00
Mitchell Hashimoto
eeaad799e5
get rid of Z buffer stuff
...
This optimization will take more work, and we already got a lot of the
way there by optimizing how we send data down to the GPU.
2022-08-19 13:48:34 -07:00
Mitchell Hashimoto
2351f88631
updateCell sets the proper Z value and bumps it
2022-08-19 13:34:07 -07:00
Mitchell Hashimoto
73e43b6e64
Grid supports sending partial cell updates to GPU
2022-08-19 12:54:07 -07:00
Mitchell Hashimoto
4ca45936f7
Only reallocate the GPU buffer if our CPU capacity changes
...
Previously, every single render was re-allocating a fairly large (~1MB)
buffer on the GPU. The recommended best practice is to allocate once and
then use `glBufferSubData` to update the memory in-place on the GPU.
We now track the last size we sent to the GPU, compare it to our copy on
the CPU, and if it _grows_ then we reallocate the GPU buffer. If it
shrinks we leave the GPU as-is for now. After this, we use the sub-data
routines to update the data in place.
2022-08-19 10:26:23 -07:00
Mitchell Hashimoto
390d95a5af
Enable depth buffer, add depth to shader
2022-08-19 10:07:30 -07:00
Mitchell Hashimoto
a36ae221ae
rename font/font.zig to font/main.zig
2022-08-19 09:56:01 -07:00
Mitchell Hashimoto
e5c583ccf5
get rid of gb_math and create matrices from scratch
2022-08-18 11:33:28 -07:00
Mitchell Hashimoto
5c2edf4d2a
Fix some stage2 compilation errors
2022-08-17 14:42:23 -07:00
Mitchell Hashimoto
2f36d5f715
pkg/tracy
2022-08-17 14:03:49 -07:00
Mitchell Hashimoto
92602dafca
rowIterator takes the tag type to iterate over
2022-08-07 10:26:04 -07:00
Mitchell Hashimoto
d0dc69a0a8
color selection!
2022-08-04 14:37:10 -07:00
Mitchell Hashimoto
f2e9746d2b
fix build error
2022-08-04 13:08:51 -07:00
Mitchell Hashimoto
5564bd7213
cursor belongs to screen (prep for alternate screen)
2022-07-22 13:08:40 -07:00
Mitchell Hashimoto
6641fcbd4c
add --font-size flag for font size in pixels
2022-07-21 21:35:49 -07:00
Mitchell Hashimoto
da622abd77
don't draw cursor on scroll
2022-07-12 21:10:35 -07:00
Mitchell Hashimoto
d15ab77c3a
handle inversion with screen inversion properly
2022-06-30 10:12:46 -07:00
Mitchell Hashimoto
527d8baaa0
invert attribute
2022-06-30 10:05:47 -07:00
Mitchell Hashimoto
f53efa633a
initial underline support, can be improved
2022-06-28 14:22:25 -07:00
Mitchell Hashimoto
75b9d1cb84
bold font rendering
2022-06-28 13:44:20 -07:00
Mitchell Hashimoto
385a682b24
move towards font family management to prep for bold/italic
2022-06-28 10:31:11 -07:00
Mitchell Hashimoto
e325ea1616
parse more SGR attrs
2022-06-26 17:37:08 -07:00
Mitchell Hashimoto
c749371bae
switch to new screen, bugs!
2022-05-21 16:42:55 -07:00
Mitchell Hashimoto
3538e6782b
update cursor on request from shell
2022-05-20 13:51:18 -07:00
Mitchell Hashimoto
75c3dc4386
render: bar cursor style
2022-05-20 13:17:31 -07:00
Mitchell Hashimoto
31d019da9e
terminal: color palette structure and generation
2022-05-19 21:21:52 -07:00
Mitchell Hashimoto
6e86afba17
update the font atlas if there are changes
2022-05-19 20:24:28 -07:00
Mitchell Hashimoto
1d0724330e
change default font size
2022-05-19 14:07:50 -07:00
Mitchell Hashimoto
3b54d05aec
CLI parsing, can set default foreground/background color
2022-05-19 14:00:35 -07:00
Mitchell Hashimoto
3a68d79d83
always draw cell bg if it has one even if no char
2022-05-12 16:46:05 -07:00