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
6b101c2293
support unit testing wasm via wasmtime
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
5c58067489
add pixman package
2022-11-24 10:21:27 -08:00
Mitchell Hashimoto
894d36f28a
build: support for dynamic linking pixman
2022-11-24 10:21:27 -08:00
Mitchell Hashimoto
699370bd4a
pkg/pixman: starting API
2022-11-24 10:21:27 -08:00
Mitchell Hashimoto
30d62fc144
workaround for x86_64 ABI issue: https://github.com/ziglang/zig/issues/13598
2022-11-19 22:07:48 -08:00
Mitchell Hashimoto
81fbc94b3c
Add a benchmark exe for testing parser throughput
2022-11-13 11:29:05 -08:00
Mitchell Hashimoto
9d736985b3
Mac bundle, icons
2022-10-31 14:04:41 -07:00
Mitchell Hashimoto
c1b70cb788
metal: devmode
2022-10-31 09:44:37 -07:00
Mitchell Hashimoto
090bab6798
metal: setup the render loop, draw the background color
2022-10-31 09:44:36 -07:00
Mitchell Hashimoto
10ee05b435
pkg/objc: selectors
2022-10-25 16:33:45 -07:00
Mitchell Hashimoto
dd8fde52d9
pkg/objc starting
2022-10-25 16:21:11 -07:00
Mitchell Hashimoto
58c107dceb
freetype: resize glyphs that are too tall prior to storing in texture
...
Most emoji fonts are massive glyphs (128x128, 256x256, etc.). This means
the texture we need to store emoji is also massive. For a 128x128 emoji
font (both Apple and Noto), we can only store 12 emoji before resizing
prior to this commit.
This commit now threads through a max height through to the font face
and resizes the bitmap in memory before putting it in the atlas. This
results in significant savings. The max height is the cell height. We
allow the glyphs to be as wide as necessary due to double (and more)
wide glyphs.
For the unicode emoji test file, the atlas size before and after:
Before: 262 MB
After: 16 MB
2022-10-17 19:14:30 -07:00
Mitchell Hashimoto
20f1077e86
enable freetype with imgui
2022-10-17 11:41:46 -07:00
Mitchell Hashimoto
f29393bca6
Imgui ( #20 )
...
* vendor/cimgui
* Add a "dev mode" window which for now is just imgui demo
2022-10-16 16:20:08 -07:00
Mitchell Hashimoto
699da6fcfe
update mach
2022-10-13 11:03:23 -07:00
Mitchell Hashimoto
939e6e7a65
pkg/harfbuzz: add coretext compilation on macOS
2022-10-02 11:05:40 -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
f9e1127317
pkg/macos: add CoreText
2022-09-30 14:48:06 -07:00
Mitchell Hashimoto
ab4491a45d
pkg/macos: start core foundation bindings
2022-09-30 14:03:37 -07:00
Mitchell Hashimoto
68786814f8
-Dtest-exe flag to build and install test executables
...
This will be used to copy tests to other platforms.
2022-09-30 13:05:23 -07:00
Mitchell Hashimoto
141182aa13
start adding fontconfig conditional compilation
2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
72105fc6cd
update to the latest stage2 compiler we can
2022-09-23 12:08:06 -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
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
367aba62c4
Add harfbuzz build (not used yet)
2022-08-28 10:09:39 -07:00
Mitchell Hashimoto
da79aae0ab
terminal: print wide characters
2022-08-20 16:11:48 -07:00
Mitchell Hashimoto
ecf8353c74
support dynamic linking (not default) test in GH actions
2022-08-20 15:21:24 -07:00
Mitchell Hashimoto
32d96dd49b
add utf8proc so we can detect unicode char width
2022-08-20 10:48:54 -07:00
Mitchell Hashimoto
5ae450099d
freetype builds in png support, uses our own zlib
2022-08-20 10:33:57 -07:00
Mitchell Hashimoto
728df4af16
build libpng and link freetype to it
2022-08-20 10:24:49 -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
ffa9ddc0d9
only build tracy if enabled
2022-08-17 17:03:38 -07:00
Mitchell Hashimoto
08292e58f3
add system SDK to build to enable cross compilation
2022-08-17 14:53:34 -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
ea1e972a29
turn tracy into proper package
2022-08-17 14:02:09 -07:00
Mitchell Hashimoto
2457454b07
test wasm of the term package
2022-08-17 13:57:21 -07:00
Mitchell Hashimoto
ead6e5a435
src/terminal can build into a minimal wasm library, I think
2022-08-17 12:25:53 -07:00
Mitchell Hashimoto
f2d65d4524
move freetype into pkg
2022-08-17 11:20:31 -07:00
Mitchell Hashimoto
b2192ea8f7
move libuv into pkg
2022-08-16 17:47:44 -07:00
Mitchell Hashimoto
c09498318a
don't install conformance tests
2022-07-26 09:55:37 -07:00
Mitchell Hashimoto
079e5e6ccf
update to latest zig
2022-07-21 09:03:39 -07:00
Mitchell Hashimoto
312434a4b7
support building with musl, although it doesn't run currently
2022-07-17 19:40:48 -07:00
Mitchell Hashimoto
0dbd4d2ca6
only compile tracy on linux
2022-06-26 10:43:00 -07:00