36 Commits

Author SHA1 Message Date
Mitchell Hashimoto
2563a195a1 font: wire up all the metric modifiers 2023-10-04 21:42:03 -07:00
Mitchell Hashimoto
54b9b45a7f font: rework font init to use a struct with modifiersets everywhere 2023-10-04 17:23:57 -07:00
Mitchell Hashimoto
15e6c07bd9 font/fontconfig: adhere to correct function signature 2023-10-03 09:26:14 -07:00
Mitchell Hashimoto
1127330b3a font/coretext: score discovered fonts 2023-10-03 09:17:41 -07:00
Mitchell Hashimoto
2fb14eee09 font: CoreText discovery searches monospace only by default 2023-09-24 08:22:50 -07:00
Mitchell Hashimoto
a2236d1ceb font: fallback search must verify presentation 2023-09-13 14:27:04 -07:00
Mitchell Hashimoto
1ee5b7f91c font: freetype supports font variation settings 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
c15cf6d9f1 font: fontconfig adaptations to new api 2023-08-25 14:57:05 -07:00
Mitchell Hashimoto
b51ef704f4 font: DeferredFace.name takes a buffer 2023-08-25 14:40:59 -07:00
Mitchell Hashimoto
167bf6f098 font: DeferredFace can no longer represent a loaded face 2023-08-25 13:28:46 -07:00
Mitchell Hashimoto
ad6c2b6cc8 font: move auto-italicization to Group 2023-08-25 13:16:42 -07:00
Mitchell Hashimoto
8113ad1393 font: share skew matrix for core text 2023-07-03 15:58:52 -07:00
Mitchell Hashimoto
4bf8a0d149 font: support skew transform for auto-italics 2023-07-03 15:54:50 -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
01de38b20d font: if CoreText needs to allocate, stack allocate and log 2023-05-31 22:03:27 -07: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
6aa212707e font: web canvas can render emoji 2022-12-06 10:55:42 -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
b858aea124 Start scaffolding web_canvas backend 2022-12-01 13:02:17 -08:00
Mitchell Hashimoto
2e1bc7bb01 Bring back freetype font bitmap conversion
Monaco on Mac is mono
2022-10-16 20:47:21 -07:00
Mitchell Hashimoto
9c99a49ac5 font: deferred face can load core text backend 2022-10-09 11:28:28 -07:00
Mitchell Hashimoto
f393049988 fix compilation 2022-10-08 11:25:54 -07:00
Mitchell Hashimoto
723db8be2f font: coretext face presentation 2022-10-08 09:55:22 -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
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
b6a4fff6d8 search for fonts on startup 2022-09-29 11:57:29 -07:00
Mitchell Hashimoto
b11ed06fc2 font: test loading deferred face for fontconfig 2022-09-24 13:34:56 -07:00
Mitchell Hashimoto
88a4cb65f3 src/font: working on initiaizing deferred fonts from fc 2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
bc9a0a36a8 store requested size alongside deferred font for loading 2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
92251ed913 font group works with deferred faces exclusively 2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
ac26c20e94 font discovery builds up a set of deferred faces 2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
1c1da63c7e deferred face hasCodepoint 2022-09-23 14:12:38 -07:00
Mitchell Hashimoto
141182aa13 start adding fontconfig conditional compilation 2022-09-23 14:12:38 -07:00