1360 Commits

Author SHA1 Message Date
Mitchell Hashimoto
95b89149aa Merge pull request #61 from mitchellh/font-group
wasm: Discovery, DeferredFace, Group, GroupCache
2022-12-05 21:18:55 -08:00
Mitchell Hashimoto
5993528f33 font: GroupCache is wasm compatible 2022-12-05 21:01:56 -08:00
Mitchell Hashimoto
62990bb33e font: Group is now wasm-compatible 2022-12-05 20:52:03 -08:00
Mitchell Hashimoto
aaa0d46b5d font: web canvas doesn't support discovery 2022-12-05 20:37:17 -08:00
Mitchell Hashimoto
5291501251 font: DeferredFace is wasm-compatible 2022-12-05 20:28:50 -08:00
Mitchell Hashimoto
e71dc470fd Merge pull request #60 from mitchellh/font-canvas
wasm: Canvas-based Rasterizer
2022-12-05 17:02:37 -08:00
Mitchell Hashimoto
2a74330911 font: begin making Group work with wasm 2022-12-05 16:08:20 -08:00
Mitchell Hashimoto
d2afddb7e2 font: fix some JS memory leaks 2022-12-05 15:45:31 -08:00
Mitchell Hashimoto
ed4e8c36b0 font: add 1 to the canvas glyph to avoid clipping 2022-12-05 15:37:55 -08:00
Mitchell Hashimoto
25f2f1a652 font: fix glyph offset calculations for render 2022-12-05 15:25:09 -08:00
Mitchell Hashimoto
5e9dd02eab font: add method for drawing atlas to canvas 2022-12-05 15:01:34 -08:00
Mitchell Hashimoto
84f6f37450 face: web canvas glyph rendering appears to work! 2022-12-05 14:28:10 -08:00
Mitchell Hashimoto
19e326dab6 font: working on rendering glyphs in canvas 2022-12-05 10:54:40 -08:00
Mitchell Hashimoto
d3b46eeeaf fix zig-js so wasm-test works 2022-12-04 22:07:50 -08:00
Mitchell Hashimoto
df302fc2b6 calculate font metrics via canvas 2022-12-04 22:01:58 -08:00
Mitchell Hashimoto
37f00ac725 don't export coretext/freetype 2022-12-04 13:19:29 -08:00
Mitchell Hashimoto
c48d8cd151 hook up logging to wasm, example uses new zig-js package 2022-12-04 13:16:54 -08:00
Mitchell Hashimoto
437f1772f1 logging works for wasm 2022-12-04 12:29:11 -08:00
Mitchell Hashimoto
940828ed97 font: web canvas creates a canvas element 2022-12-03 22:11:01 -08:00
Mitchell Hashimoto
21faf0b6fb add zig-js 2022-12-03 21:46:00 -08:00
Mitchell Hashimoto
fc618d37b2 Merge branch 'wasm' 2022-12-03 21:36:21 -08:00
Mitchell Hashimoto
f82593bcae update zig 2022-12-03 21:36:11 -08:00
Mitchell Hashimoto
1840829e9e add node for web stuff 2022-12-03 21:34:14 -08:00
Mitchell Hashimoto
c32219554a blank out web canvas impl 2022-12-01 13:02:17 -08:00
Mitchell Hashimoto
b858aea124 Start scaffolding web_canvas backend 2022-12-01 13:02:17 -08:00
Mitchell Hashimoto
6b101c2293 support unit testing wasm via wasmtime 2022-12-01 13:02:17 -08:00
Mitchell Hashimoto
3a4d881444 wasm allocator, consider "host-owned" pointers 2022-12-01 13:02:17 -08:00
Mitchell Hashimoto
24cc01e055 move wasm main to src/, export an Atlas API
We don't need the Atlas API for wasm at all, but its a good way to test
things work incrementally and its a pretty cool thing to have as a wasm
library really.
2022-12-01 13:02:17 -08:00
Mitchell Hashimoto
fe805f1031 update zig 2022-12-01 12:59:40 -08:00
Mitchell Hashimoto
6ad45f0237 update zig 2022-11-30 16:54:04 -08:00
Mitchell Hashimoto
67f8c231f8 update nixpkgs to 22.11 2022-11-29 14:44:56 -08:00
Mitchell Hashimoto
8ac759fa52 update zig again 2022-11-29 13:00:57 -08:00
Mitchell Hashimoto
88c37fb617 update zig version 2022-11-29 12:57:42 -08:00
Mitchell Hashimoto
7c4d024aba update mach for macOS Ventura 2022-11-29 10:13:21 -08:00
Mitchell Hashimoto
f871630fa4 move Atlas to font 2022-11-28 10:35:46 -08:00
Mitchell Hashimoto
2796a0b964 font: when resizing a glyph, scale metrics by same ratio
We rely on the top/left offset to position the glyph properly. When we
were resizing, we weren't properly recalculating this offset which led
to some glyphs slightly (or majorly) off depending on how much they
resized.
2022-11-27 22:06:25 -08:00
Mitchell Hashimoto
29cc8312d5 revert 2022-11-27 21:45:10 -08:00
Mitchell Hashimoto
4a3376d916 fix crash with cursor going off screen on resize 2022-11-27 21:06:11 -08:00
Mitchell Hashimoto
b8832833cb respect application cursor keys for arrow (DECCKM)
This fixes the arrow keys in htop.
2022-11-27 20:57:58 -08:00
Mitchell Hashimoto
0e55f4054e font: Shaper should replace 0 with 0x20 (space)
This didn't cause any real problems but it was a waste to trigger the
full font fallback system for codepoint 0.
2022-11-27 20:25:21 -08:00
Mitchell Hashimoto
ddaed26f10 update TODO 2022-11-27 20:16:39 -08:00
Mitchell Hashimoto
51ff0bbd7c Merge pull request #58 from mitchellh/underline-styles
Underline styles: singe, double, dashed, dotted, curly
2022-11-27 16:23:21 -08:00
Mitchell Hashimoto
379072566f remove underline support from shaders since we now use sprites 2022-11-27 16:18:00 -08:00
Mitchell Hashimoto
2b9a47edb2 metal: underline styles 2022-11-27 16:15:22 -08:00
Mitchell Hashimoto
bfc657395a curly underlines 2022-11-27 16:11:15 -08:00
Mitchell Hashimoto
fee681ac78 dashed underlines 2022-11-27 15:44:12 -08:00
Mitchell Hashimoto
6a32a30a16 font: render dotted underlines 2022-11-27 15:39:18 -08:00
Mitchell Hashimoto
c2d08c3071 terminal: parse all underline styles 2022-11-27 15:39:12 -08:00
Mitchell Hashimoto
5045e51b99 unknown underline styles render a single underline 2022-11-27 15:30:49 -08:00
Mitchell Hashimoto
d7fe6a1c47 fix sgr parsing for underline styles 2022-11-27 15:30:02 -08:00