Mitchell Hashimoto
3915d9ee3a
font: add CodepointMap with tests
2023-09-24 11:22:57 -07:00
Kevin Hovsäter
22b8173164
Fix typos
2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
51e42a62ed
font: default rasterizer on macOS is now coretext
2023-07-01 10:04:49 -07: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
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
a87b21dbee
font: mac should use freetype rasterizer by default
2022-12-12 22:12:11 -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
5993528f33
font: GroupCache is wasm compatible
2022-12-05 21:01:56 -08:00
Mitchell Hashimoto
5291501251
font: DeferredFace is wasm-compatible
2022-12-05 20:28:50 -08:00
Mitchell Hashimoto
2a74330911
font: begin making Group work with wasm
2022-12-05 16:08:20 -08:00
Mitchell Hashimoto
940828ed97
font: web canvas creates a canvas element
2022-12-03 22:11:01 -08:00
Mitchell Hashimoto
b858aea124
Start scaffolding web_canvas backend
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
f871630fa4
move Atlas to font
2022-11-28 10:35:46 -08:00
Mitchell Hashimoto
278668c953
font: draw single and double underlines as sprites
2022-11-27 15:14:49 -08:00
Mitchell Hashimoto
b34e336c5c
rearrange box rendering to prepare for more sprite drawing
2022-11-27 10:17:12 -08:00
Mitchell Hashimoto
4b8b5c5fc1
font: skeleton for box drawing and hook up to Group
2022-11-24 10:21:27 -08:00
Mitchell Hashimoto
90f3b9391c
font: begin coretext Face
2022-10-08 09:43:54 -07:00
Mitchell Hashimoto
71ec509930
Make font face a compile time interface, stub for coretext
2022-10-08 09:19:21 -07:00
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