200 Commits

Author SHA1 Message Date
Mitchell Hashimoto
552a1b51d0 coretext: rasterization looking cleaner 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
079fe7bc94 coretext: the size needs to be in pixels! (see comment) 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
4d7a2c9f05 font: remove the old comment about not doing the grey stroke 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
45da58188c fix up for new zig 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
ef5d86ffb0 coretext: initially fill grey 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
2a1cbb4f21 coretext: calculate units per em/point 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
314f9287b1 Update Zig (#164)
* update zig

* pkg/fontconfig: clean up @as

* pkg/freetype,harfbuzz: clean up @as

* pkg/imgui: clean up @as

* pkg/macos: clean up @as

* pkg/pixman,utf8proc: clean up @as

* clean up @as

* lots more @as cleanup

* undo flatpak changes

* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
56f8e39e5b Update zig, mach, fmt 2023-06-25 11:08:20 -07:00
Mitchell Hashimoto
30fdbaebf4 font: run splitting needs to detect italics 2023-06-23 13:56:07 -07:00
Mitchell Hashimoto
6e79e84acf config file quoted strings are accepted now 2023-06-23 13:45:48 -07:00
Mitchell Hashimoto
1d45df17e4 font: underline sprites should never go out of bounds for canvas 2023-06-22 20:11:57 -07:00
Mitchell Hashimoto
43554c1b64 font: remove old logging 2023-06-22 16:07:43 -07:00
Mitchell Hashimoto
e810a7bf91 font: fix double underline drawing with very low underline positions 2023-06-22 16:07:10 -07:00
Mitchell Hashimoto
cfb8108279 font: curly underline has a minimum wave height
This fixes rendering issues with some fonts where the underline position
is too close to the bottom of the cell causing a very shallow curl.
2023-06-22 16:01:00 -07:00
Mitchell Hashimoto
01de38b20d font: if CoreText needs to allocate, stack allocate and log 2023-05-31 22:03:27 -07:00
Mitchell Hashimoto
b196e43ee4 fix some issues for future Zig update 2023-05-19 08:34:07 -07:00
Mitchell Hashimoto
97d9157d22 update zig version 2023-05-07 20:50:51 -07:00
Mitchell Hashimoto
f5ee25d172 font/shaper/web_canvas: needs to add null selection for shaper test 2023-03-23 10:35:05 -07:00
Mitchell Hashimoto
2be4eb0da7 font/shaper: split runs at selection boundaries 2023-03-23 10:24:22 -07:00
Mitchell Hashimoto
20f9e98894 font/freetype: add a 1px border to each glyph in the texture atlas 2023-03-16 22:54:21 -07:00
Mitchell Hashimoto
cf519bcd75 Use procedurally generated sprites for cursors rather than shaders 2023-03-04 15:14:10 -08:00
Mitchell Hashimoto
25cf4eac43 don't need to set all sprite values in enum 2023-03-04 14:45:34 -08:00
Mitchell Hashimoto
bb48ebc9cb fix wasm build 2023-03-04 14:26:56 -08:00
Mitchell Hashimoto
06035e2f95 can now use -Dfont-backend to choose the font backend to use 2023-03-04 10:50:13 -08:00
Mitchell Hashimoto
ce86c64b42 update zig, src for loops 2023-02-27 21:46:42 -08:00
Mitchell Hashimoto
e8a1fe4d87 move wasm target struct around to avoid analyzing wasm file on non-wasm 2022-12-31 09:04:11 -08:00
Mitchell Hashimoto
8b6128ddfc start making the src more wasm target aware 2022-12-31 08:57:12 -08:00
Mitchell Hashimoto
241bfee7d4 wasm: use shared, imported memory
This switches our wasm build to use "shared" memory. Shared memory can
be shared across multiple web workers, which is something we'll want to
support for our multi-threaded behaviors later.

Shared memory has a number of different restrictions so this updates
zig-js to support it as well as updates some of our functions that need
to be aware of it.
2022-12-24 16:24:43 -08:00
Mitchell Hashimoto
609ba91cc9 font: clear up some logging 2022-12-14 22:06:40 -08:00
Mitchell Hashimoto
05a5cfddb5 font: web canvas sprite trapezoid 2022-12-13 22:22:00 -08:00
Mitchell Hashimoto
c391d0f3de font: web canvas sprite font can composite 2022-12-13 22:17:27 -08:00
Mitchell Hashimoto
bf054e5b44 font: web canvas sprite font can write to atlas 2022-12-13 22:01:13 -08:00
Mitchell Hashimoto
b48a0db040 font: web canvas rect sprite func 2022-12-13 21:46:33 -08:00
Mitchell Hashimoto
c9755f5fd1 font: mostly empty web canvas sprite renderer, but compiles 2022-12-13 21:19:40 -08:00
Mitchell Hashimoto
68e697dcbe font: remove getData from canvas 2022-12-13 21:09:09 -08:00
Mitchell Hashimoto
ead8610604 font: Box font uses canvas abstraction 2022-12-13 21:08:45 -08:00
Mitchell Hashimoto
b21e18a9e6 font: start converting Box font to our abstract canvas interface 2022-12-13 16:16:56 -08:00
Mitchell Hashimoto
a87b21dbee font: mac should use freetype rasterizer by default 2022-12-12 22:12:11 -08:00
Mitchell Hashimoto
c8252133a3 update zig version 2022-12-12 22:10:52 -08:00
Mitchell Hashimoto
bc74033ad6 face: web canvas can render grapheme clusters 2022-12-12 21:40:54 -08:00
Mitchell Hashimoto
a1dda2c37f font: faceFromIndex returns a pointer to the face 2022-12-12 21:34:34 -08:00
Mitchell Hashimoto
c06ca04a1a font: web canvas tracks glyph indexes for grapheme clusters 2022-12-12 11:31:30 -08:00
Mitchell Hashimoto
2b3478ce3d font: start web canvas shaping, we perform grapheme clustering 2022-12-11 22:12:12 -08:00
Mitchell Hashimoto
35000bced1 font: shaper test should decode unicode codepoints 2022-12-08 12:42:09 -08:00
Mitchell Hashimoto
0c9a9b1f91 font: web canvas face has to render to check presentation for cp
Since we have no way to detect our presentation (text/emoji), we need to
actually render the glyph that is being requested to double-check that
the glyph matches our supported presentation.

We do this because the browser will render fallback fonts for a glyph if
it can't find one in the named font.
2022-12-07 19:20:04 -08:00
Mitchell Hashimoto
f53d9fb704 font: web canvas shaper yields runs 2022-12-07 18:29:49 -08:00
Mitchell Hashimoto
dd71456f35 font: shapers init with allocator since web canvas needs to init buffer 2022-12-06 13:44:55 -08:00
Mitchell Hashimoto
f0b7fbecee font: extract common shaper elements out 2022-12-06 13:23:53 -08:00
Mitchell Hashimoto
e3c18f3f51 font: move shaper into comptime interface 2022-12-06 11:20:37 -08:00
Mitchell Hashimoto
6aa212707e font: web canvas can render emoji 2022-12-06 10:55:42 -08:00