80 Commits

Author SHA1 Message Date
Krzysztof Wolicki
1913243c35 WIP: Update to new build module API after Zig PR #18160
Temporarily change dependency sources to forks until they update
2024-01-03 21:50:32 +01:00
Kyaw
22d631942c font/coretext: use CTFontCopyFamilyName
Use `CTFontCopyFamilyName` instead of `CTFontCopyDisplayName` to get
the font name to match the behavior of how it's done on freetype
backend.
2023-12-15 02:26:47 +06:30
Mitchell Hashimoto
cc0b615552 pkg/macos: more APIs 2023-12-11 20:48:45 -08:00
Mitchell Hashimoto
0137f5b0d3 pkg/macos: add many more text APIs 2023-12-11 11:12:29 -08:00
Mitchell Hashimoto
ff68c56268 pkg/macos: implement CTRun 2023-12-11 11:12:28 -08:00
Mitchell Hashimoto
0230222c0d pkg/macos: add CoreVide for DisplayLink 2023-11-17 21:50:34 -08:00
Krzysztof Wolicki
44a48f62f1 change unmodified vars to consts in anticipation of zig changes 2023-11-17 15:46:46 +01:00
Mitchell Hashimoto
cb684e35cc font/coretext: discovery scoring should take into account symb. traits
Fixes #707

Our scoring algorithm previously did not take into account symbolic
traits, so when `bold = false and italic = false`, regular, bold, italic
would all be equally likely to appear first.

This modifies our scoring algorithm to prioritize matching symbolic
traits. Further, we have a special case for no symbolic traits to
prioritize "Regular" named styles. We can expand this to other styles
too but we do not do this here.

We also modified the algorithm to always prefer fonts with more glyphs
over fonts with less, hopeful that we can load fewer fonts for other
glyphs later.
2023-11-03 22:21:34 -07:00
Mitchell Hashimoto
1411015038 font: fallback search should search full discovery chain
Fixes #668

We were previously only checking the first font result in the search.
This also fixes our CoreText scoring algorithm to prioritize faces that
have the codepoint we're searching for.
2023-10-13 12:25:27 -07:00
Mitchell Hashimoto
1127330b3a font/coretext: score discovered fonts 2023-10-03 09:17:41 -07:00
Mitchell Hashimoto
fda56fd11f pkg/macos: MutableArray, sorting 2023-10-02 22:26:47 -07:00
Mitchell Hashimoto
0021b290cf pkg: add test targets 2023-10-01 18:43:25 -07:00
Mitchell Hashimoto
ec26fb7cee pkg/macos 2023-10-01 17:02:12 -07:00
Mitchell Hashimoto
2237b43df0 pkg/freetype, harfbuzz modules 2023-10-01 16:57:45 -07:00
Mitchell Hashimoto
9d0729f17c font/coretext: ability to set variation axes 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
fb0f80f9ca macos: add necessary functions for variation axes querying 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
7659a2a733 build: fix linking bugs for macos test 2023-08-18 08:23:58 -07:00
Mitchell Hashimoto
3d23f26326 input, macos: initial work on keymapper and macos usage of it 2023-08-11 12:01:58 -07:00
Mitchell Hashimoto
d649b3f6d4 update zig 2023-08-02 14:39:19 -07:00
Mitchell Hashimoto
4bf8a0d149 font: support skew transform for auto-italics 2023-07-03 15:54:50 -07:00
Mitchell Hashimoto
0a718ec3eb pkg/macos: do not use bitCast through a function
workaround Zig issue: https://github.com/ziglang/zig/issues/16290
2023-07-01 13:38:10 -07:00
Mitchell Hashimoto
d39e3f5428 coretext: improved baseline calculation 2023-07-01 09:23:40 -07:00
Mitchell Hashimoto
a74e49833b coretext: colored glyph rendering 2023-07-01 09:23:40 -07:00
Mitchell Hashimoto
552a1b51d0 coretext: rasterization looking cleaner 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
45da58188c fix up for new zig 2023-07-01 09:23:39 -07:00
Mitchell Hashimoto
2a1cbb4f21 coretext: calculate units per em/point 2023-07-01 09:23:39 -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
b196e43ee4 fix some issues for future Zig update 2023-05-19 08:34:07 -07:00
Mitchell Hashimoto
be75109a1d new build system 2023-02-14 20:58:33 -08:00
Mitchell Hashimoto
da2942e083 font: specific codepoint lookup in internals 2022-11-17 15:49:14 -08:00
Mitchell Hashimoto
b91cd8e41c pkg/macos: character set in range 2022-11-17 15:15:09 -08:00
Mitchell Hashimoto
843dc8ae14 pkg/macos: support CFCharacterSet 2022-11-17 15:09:53 -08:00
Mitchell Hashimoto
9e3bbc1598 macos: send logs to unified logging 2022-10-31 15:16:29 -07:00
Mitchell Hashimoto
7608d7921f pkg/macos: OS Log support 2022-10-31 14:47:10 -07:00
Mitchell Hashimoto
6c84199b84 fix more stage2 build errors 2022-10-14 10:01:41 -07:00
Mitchell Hashimoto
e493a722a3 fix some issues that fail nightly stage2 compiler 2022-10-13 10:54:30 -07:00
Mitchell Hashimoto
a6c3ee3bc2 pkg/macos: fix zig C ABI issue 2022-10-10 09:18:57 -07:00
Mitchell Hashimoto
1e23779337 pkg/macos: more stuff 2022-10-10 09:03:03 -07:00
Mitchell Hashimoto
1cf390729e pkg/macos: bitmap info arg 2022-10-09 16:29:19 -07:00
Mitchell Hashimoto
1b7bc052d4 font: coretext calculate cell metrics 2022-10-09 10:57:19 -07:00
Mitchell Hashimoto
8b3959dceb macos: frames, attributed strings, stylized strings 2022-10-09 08:07:56 -07:00
Mitchell Hashimoto
1e2e4169a5 pkg/macos: starting frames 2022-10-08 17:52:01 -07:00
Mitchell Hashimoto
cc14344bf8 pkg/macos: path 2022-10-08 17:39:25 -07:00
Mitchell Hashimoto
061f7f6a30 pkg/macos: text framesetter 2022-10-08 17:29:50 -07:00
Mitchell Hashimoto
26280d4fe5 macos: AttributedString 2022-10-08 17:24:33 -07:00
Mitchell Hashimoto
a97f997f9a font: start working on core text cell height calcs 2022-10-08 17:03:09 -07:00
Mitchell Hashimoto
c9a335646e pkg/macos: some font metrics functions 2022-10-08 11:34:45 -07:00
Mitchell Hashimoto
26629bcb6e pkg/macos: create fonts from data 2022-10-08 10:21:33 -07:00
Mitchell Hashimoto
d0e269df6a macos: data 2022-10-08 10:20:48 -07:00