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
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
47242ad12a
test writing graphemes
2022-09-05 10:29:52 -07:00
Mitchell Hashimoto
77c8ec0a20
the big screen switchover
2022-09-01 00:58:47 -07:00
Mitchell Hashimoto
39376feae0
font: shape API, calls shape and outputs some debug
2022-08-29 20:15:29 -07:00
Mitchell Hashimoto
dafc99746d
font: Face initializes a hb_font alongside every face
2022-08-29 16:46:53 -07:00
Mitchell Hashimoto
0505018186
Line segmentation into text runs
2022-08-29 16:39:48 -07:00
Mitchell Hashimoto
2cab94e64d
move cell metrics calculation out into src/font
2022-08-29 11:44:05 -07:00
Mitchell Hashimoto
bd9c048c02
use new font.GroupCache, remove unused font structs
2022-08-29 11:34:21 -07:00
Mitchell Hashimoto
a0aa100815
font: GroupCache is like Group, but with caching...
2022-08-29 11:10:50 -07:00
Mitchell Hashimoto
a75035c042
font: introduce Group which will eventually replace FallbackSet
...
This is more oriented around glyph indexes and also introduces an
important concept in the FontIndex which can be cached ahead of time so
that we can eventually break down text into runs for text shaping.
2022-08-29 10:16:53 -07:00
Mitchell Hashimoto
985b329c8a
src/font: change Face to require font to init
2022-08-29 08:48:40 -07:00
Mitchell Hashimoto
f1abca51f7
convert src/font to use new pkg/freetype
2022-08-28 22:22:16 -07:00
Mitchell Hashimoto
d8a06e7768
clean up some imports
2022-08-28 14:50:22 -07:00
Mitchell Hashimoto
9601920b4d
font size is now in font points, determine size based on window DPI
2022-08-25 12:29:28 -07:00
Mitchell Hashimoto
f93e9eedb3
font: move codepoint into a public API
2022-08-20 10:50:37 -07:00
Mitchell Hashimoto
813f11a5eb
fix crash that could happen looking up fallback
2022-08-20 10:37:12 -07:00
Mitchell Hashimoto
c29f4cace6
remove the font style fallback for the fallback set
2022-08-20 10:37:12 -07:00
Mitchell Hashimoto
43c61f57ef
font FallbackSet for looking up in fallback TTFs (emoji)
2022-08-20 10:37:12 -07:00
Mitchell Hashimoto
22ed65a818
really hacked in emoji support, time to clean it up
2022-08-20 10:37:11 -07:00
Mitchell Hashimoto
3d6ca0e423
font face supports loading color fonts (emoji!)
2022-08-20 10:37:11 -07:00
Mitchell Hashimoto
f9313801f1
avoid an alloc and buffer copy in the common case on font loading
2022-08-19 15:12:57 -07:00
Mitchell Hashimoto
742dd010eb
Texture atlas supports variable color depth, not just greyscale
2022-08-19 14:37:22 -07:00
Mitchell Hashimoto
a36ae221ae
rename font/font.zig to font/main.zig
2022-08-19 09:56:01 -07:00
Mitchell Hashimoto
5c2edf4d2a
Fix some stage2 compilation errors
2022-08-17 14:42:23 -07:00
Mitchell Hashimoto
f2d65d4524
move freetype into pkg
2022-08-17 11:20:31 -07:00
Mitchell Hashimoto
75b9d1cb84
bold font rendering
2022-06-28 13:44:20 -07:00
Mitchell Hashimoto
d5b018349c
add bold font, doesn't work yet
2022-06-28 10:52:59 -07:00
Mitchell Hashimoto
385a682b24
move towards font family management to prep for bold/italic
2022-06-28 10:31:11 -07:00