Mitchell Hashimoto
f41cbf228b
font: set "backend" enum vs booleans
2022-10-02 09:41:37 -07:00
Mitchell Hashimoto
12c9482d48
Mac Font Discovery with CoreText ( #17 )
...
This implements font discovery so the `--font-family` flag works for macOS. Fonts are looked up using the Core Text API so any installed font on the Mac system can be used.
We still use FreeType for rendering, and CoreText doesn't _quite_ give us all the information we need to build the exact face in FreeType. So a TODO after this is to now implement glyph _rendering_ using Core Text and Core Graphics. Until then, a couple fonts don't quite work (i.e. Monaco, a big one!) but many do!
2022-10-01 22:21:30 -07:00
Mitchell Hashimoto
a3d9dad726
fix tests so they pass on mac
2022-09-30 13:24:54 -07:00
Mitchell Hashimoto
53aab0a163
--font-family CLI config
2022-09-29 14:51:31 -07:00
Mitchell Hashimoto
7eac0afff2
cli args can parse null-terminated strings
2022-09-29 14:45:37 -07:00
Mitchell Hashimoto
5567564dd0
cli args fix stage1 miscompilation, add font families
2022-09-29 13:14:20 -07:00
Mitchell Hashimoto
7f45916b89
only discover if it is enabled
2022-09-29 11:58:00 -07:00
Mitchell Hashimoto
b6a4fff6d8
search for fonts on startup
2022-09-29 11:57:29 -07:00
Mitchell Hashimoto
30a5041a38
font Group has Lib, loads deferred faces when needed
2022-09-29 10:30:45 -07:00
Mitchell Hashimoto
b11ed06fc2
font: test loading deferred face for fontconfig
2022-09-24 13:34:56 -07:00
Mitchell Hashimoto
88a4cb65f3
src/font: working on initiaizing deferred fonts from fc
2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
bc9a0a36a8
store requested size alongside deferred font for loading
2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
92251ed913
font group works with deferred faces exclusively
2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
ac26c20e94
font discovery builds up a set of deferred faces
2022-09-23 14:12:38 -07:00
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
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
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
59191b05cd
build fontconfig
2022-09-13 14:34:40 -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
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
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
8d90292cb2
remove font conversion stuff
2022-09-07 16:17:41 -07:00
Mitchell Hashimoto
278d9ad9d6
add tracing
2022-09-07 16:10:16 -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
Mitchell Hashimoto
da7843e8b4
test shaping a long emoji
2022-09-06 14:25:29 -07:00
Mitchell Hashimoto
3754de3b95
test very long emoji
2022-09-06 14:21:07 -07:00
Mitchell Hashimoto
f40eb3663a
kind of handle VS15/16 better, its not blank anymore, but its wrong
2022-09-06 13:56:20 -07:00
Mitchell Hashimoto
e326bc4921
fonts are presentation format aware (text vs emoji)
2022-09-06 13:30:29 -07:00
Mitchell Hashimoto
302889bfb3
font don't include convert
2022-09-05 22:53:29 -07:00
Mitchell Hashimoto
0d2c03c21c
Font face handles zero-width glyphs (weird but happens)
2022-09-05 22:53:00 -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
9e8d00f140
attach zero-width joiners to cells
2022-09-05 11:32:14 -07:00
Mitchell Hashimoto
8ef31aaaf9
Disable
2022-09-05 11:22:29 -07:00
Mitchell Hashimoto
802f230fa2
handle graphemes with more than 1 joiner
2022-09-05 10:35:22 -07:00
Mitchell Hashimoto
47242ad12a
test writing graphemes
2022-09-05 10:29:52 -07:00