Matthew Winter
a5eb746cf5
feat: update undercurl with antialiasing
2023-10-29 02:49:31 +11:00
Mitchell Hashimoto
7995d44cfb
font: render sprites with a configurable grid cell width
...
Fixes #666
2023-10-13 14:31:55 -07:00
Mitchell Hashimoto
b98cc3d79f
config: add remaining font modifiers
2023-10-04 22:08:19 -07:00
Mitchell Hashimoto
4ed240515c
font/sprite: fix horizontal dash drawing math for cells too small
...
Fixes #143
There were multiple issues with the previous calculation. First, we
expected dash width COULD be negative and protected against it, but our
dash width calculation type was unsigned! With the proper font metrics,
this led to an underflow safey panic.
Second, as part of the dash width calculation, we are tryign to downstep
the size of the gaps so we can try to fit dashes within a cell. But we
were not using those adjusted gap sizes. With the proper font metrics,
this could lead to an assertion failure seen in #143 .
This fixes the calculations. They produce the same numbers, but do so in
a more Zig-idiomatic way while fixing the above two issues.
2023-08-29 11:25:49 -07:00
Kevin Hovsäter
22b8173164
Fix typos
2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
9300404603
font: block cursor was not taking full cell width
2023-07-10 11:45:35 -07:00
Mitchell Hashimoto
853f15ef19
bar cursor was short by a couple pixels
2023-07-04 13:12:21 -07:00
Mitchell Hashimoto
3c5be0726f
sprite: all rasterized sprites should have a 1px padding
2023-07-01 09:23:40 -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
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
97d9157d22
update zig version
2023-05-07 20:50:51 -07:00
Mitchell Hashimoto
cf519bcd75
Use procedurally generated sprites for cursors rather than shaders
2023-03-04 15:14:10 -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
f871630fa4
move Atlas to font
2022-11-28 10:35:46 -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
278668c953
font: draw single and double underlines as sprites
2022-11-27 15:14:49 -08:00
Mitchell Hashimoto
84efd2ac5f
font: use Canvas more, Canvas rect
2022-11-27 14:08:15 -08:00
Mitchell Hashimoto
28d386967d
font: introduce Canvas, start converting Box
2022-11-27 13:54:43 -08:00
Mitchell Hashimoto
b34e336c5c
rearrange box rendering to prepare for more sprite drawing
2022-11-27 10:17:12 -08:00