17 Commits

Author SHA1 Message Date
Mitchell Hashimoto
a4e8b5ae8c calculate font metrics per face 2022-10-03 12:31:07 -07:00
Mitchell Hashimoto
f41cbf228b font: set "backend" enum vs booleans 2022-10-02 09:41:37 -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
b11ed06fc2 font: test loading deferred face for fontconfig 2022-09-24 13:34:56 -07:00
Mitchell Hashimoto
141182aa13 start adding fontconfig conditional compilation 2022-09-23 14:12:38 -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
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
f1abca51f7 convert src/font to use new pkg/freetype 2022-08-28 22:22:16 -07:00
Mitchell Hashimoto
f93e9eedb3 font: move codepoint into a public API 2022-08-20 10:50:37 -07:00
Mitchell Hashimoto
43c61f57ef font FallbackSet for looking up in fallback TTFs (emoji) 2022-08-20 10:37:12 -07:00
Mitchell Hashimoto
a36ae221ae rename font/font.zig to font/main.zig 2022-08-19 09:56:01 -07:00