Mitchell Hashimoto
1c1da63c7e
deferred face hasCodepoint
2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
141182aa13
start adding fontconfig conditional compilation
2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
51d70fc74e
reproduced issue for upgrade comment
2022-09-23 13:37:20 -07:00
Mitchell Hashimoto
53f5739eca
use meta.FnPtr to prep for stage2
2022-09-23 13:20:43 -07:00
Mitchell Hashimoto
3bd9ed5952
Fix invalid c types with fontconfig
2022-09-23 13:14:08 -07:00
Mitchell Hashimoto
1a2b684b0e
RGB should not be packed, so that it has align = 1
2022-09-23 13:10:51 -07:00
Mitchell Hashimoto
a1d238e385
Fix a couple bugs in memory access (tests only)
2022-09-23 12:51:50 -07:00
Mitchell Hashimoto
72105fc6cd
update to the latest stage2 compiler we can
2022-09-23 12:08:06 -07:00
Mitchell Hashimoto
57a82a26e7
pkg/fontconfig: const pointers
2022-09-17 09:19:00 -07:00
Mitchell Hashimoto
9750ac87fd
pkg/fontconfig: pattern get
2022-09-17 09:04:40 -07:00
Mitchell Hashimoto
86f7d0e04e
pkg/fontconfig: add some error handling
2022-09-17 08:58:42 -07:00
Mitchell Hashimoto
0d80225977
fontconfig: charset and langset apis
2022-09-16 15:12:02 -07:00
Mitchell Hashimoto
d69f8397f3
pkg/fontconfig: add weights/slants enum
2022-09-16 10:08:49 -07:00
Mitchell Hashimoto
5b215409c6
pkg/fontconfig: pattern.add
2022-09-16 09:55:45 -07:00
Mitchell Hashimoto
c68c487e14
Make selection part of the cache key for GPU cells
...
If the selection state changes for a given row, the row must be
invalidated.
2022-09-14 19:58:36 -07:00
Mitchell Hashimoto
77851b30a2
Revert "update to latest Zig nightly"
...
This reverts commit f3f2c3df268db905b6af6588e5e5008da0f48b60.
2022-09-14 19:39:10 -07:00
Mitchell Hashimoto
f3f2c3df26
update to latest Zig nightly
2022-09-14 19:34:19 -07:00
Mitchell Hashimoto
f5319f1ca6
Merge pull request #14 from mitchellh/fontconfig
...
Fontconfig (bindings only)
2022-09-14 14:33:00 -07:00
Mitchell Hashimoto
e4ea27ec37
fontconfig: more APIs
2022-09-14 14:30:18 -07:00
Mitchell Hashimoto
aca36ba79b
fontconfig: fc-match
2022-09-14 14:26:42 -07:00
Mitchell Hashimoto
03ab1bedd4
fontconfig: fc-match
2022-09-14 12:49:43 -07:00
Mitchell Hashimoto
eb2ce495b3
fontconfig: font list
2022-09-14 10:14:09 -07:00
Mitchell Hashimoto
ce899dca11
fontconfig: font sets
2022-09-14 10:05:09 -07:00
Mitchell Hashimoto
382f569d65
fontconfig: object sets and patterns
2022-09-14 09:54:48 -07:00
Mitchell Hashimoto
b4d571e018
pkg/fontconfig: disable ubsan (reported upstream)
2022-09-14 09:23:02 -07:00
Mitchell Hashimoto
4ca71eef7c
don't build fontconfig on mac
2022-09-13 14:46:33 -07:00
Mitchell Hashimoto
59191b05cd
build fontconfig
2022-09-13 14:34:40 -07:00
Mitchell Hashimoto
d422d1ee78
pkg/fontconfig: starting, not working
2022-09-13 13:53:20 -07:00
Mitchell Hashimoto
d5ee4f8b21
Cell GPU cache must also key by screen type (primary/alternate)
2022-09-13 10:43:03 -07:00
Mitchell Hashimoto
7bde20a43d
a cell is empty only if it also has no styling
...
Previously we only checked if it had no character. With text shaping,
this was causing runs of only empty backgrounds to not render.
2022-09-13 10:12:44 -07:00
Mitchell Hashimoto
b5f9e8abf0
fix potential crash
2022-09-13 10:12:29 -07:00
Mitchell Hashimoto
0801786d51
Cache text shaping results per row
...
This uses an LRU to cache text shaping results per row. Rows are marked "dirty" and the cache invalidated whenever any cell on a row changes. Rows are identified by an ID in the screen circular buffer and not by y-value so even as the screen scrolls, the row cache remains valid. Benchmarks via tracing:
* Heavy output (`cat <big>.txt`) - ~2% slower due to overhead of low hit rate on cache
* Mostly static screen with only text - ~10% faster, high cache hit rate
* Mostly static screen with a mix of ligatures, emoji, text - ~40% faster, high cache hit rate
Terminals are "mostly static". Usually we sit with our prompt sitting there flashing, just re-rendering the history that already exists. We might scroll back a bit to see some recent results. Ultimately, `cat <big>.txt` is not that common so I think trading 2% slowdown on that for 10-40% speedup on the common case is worth it.
These percentages can eventually be thought of as direct FPS improvements (40% more FPS) once I split tty stream processing and rendering into separate threads and remove the FPS limiter that exists today.
2022-09-12 12:01:26 -07:00
Mitchell Hashimoto
b694afa425
update TODO
2022-09-12 11:39:20 -07:00
Mitchell Hashimoto
662b656218
implement LRU row GPU cell caching
2022-09-12 11:28:47 -07:00
Mitchell Hashimoto
3e27120e8c
lru resize
2022-09-12 11:01:22 -07:00
Mitchell Hashimoto
4f6c67fe9d
add LRU
2022-09-12 10:21:18 -07:00
Mitchell Hashimoto
8995e74e23
rows are dirty when initialized
2022-09-10 11:01:40 -07:00
Mitchell Hashimoto
08b7a866b6
Screen dirty tracking
2022-09-10 10:59:57 -07:00
Mitchell Hashimoto
d7d372124b
update to stage3 zig with -fstage1
2022-09-08 13:46:05 -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
d42c99b6be
Merge pull request #12 from mitchellh/ligs
...
Ligatures v1 and VS15/VS16 Emoji Support
2022-09-07 16:18:58 -07:00
Mitchell Hashimoto
8d90292cb2
remove font conversion stuff
2022-09-07 16:17:41 -07:00
Mitchell Hashimoto
d951e40553
update TODO
2022-09-07 16:15:38 -07:00
Mitchell Hashimoto
54d47e8390
update TODO
2022-09-07 16:10:27 -07:00
Mitchell Hashimoto
278d9ad9d6
add tracing
2022-09-07 16:10:16 -07:00
Mitchell Hashimoto
90e4d12f79
only scale fonts to height
2022-09-07 15:59:23 -07:00
Mitchell Hashimoto
c1bb6450b0
fix some emoji sizing
2022-09-07 14:41:37 -07:00
Mitchell Hashimoto
85dff335f1
much more accurate run splits and cell widths in runs
2022-09-07 10:30:40 -07:00
Mitchell Hashimoto
3f1942223b
only test presentation VS15/16 if directly adjacent to codepoint
2022-09-06 14:26:43 -07:00