383 Commits

Author SHA1 Message Date
Mitchell Hashimoto
4b5ad77b70 font: fontconfig always prefer monospace in pattern
Fixes #1984
2024-07-21 09:48:07 -07:00
Mitchell Hashimoto
1677e95f86 pkg/oniguruma: add additional header configs for build
Fixes #1887

There seems to be no issue adding these for our other platforms and it
appears to get builds on Chimera working.
2024-06-28 07:34:55 -04:00
Mitchell Hashimoto
98689413b4 disable AVX512 until Zig issue is resolved
https://github.com/ziglang/zig/issues/20414
2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
2c2a830aa6 pkg/oniguruma: call new functions 2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
a30e791c85 begin 0.13 update process -- very broken 2024-06-24 15:16:22 -07:00
Qwerasd
626ec2b5ac perf: introduce CFReleaseThread for running CoreFoundation releases
Some CoreFoundation objects, such as those produced by CoreText, have
expensive callbacks that run when they are released. By offloading the
CFRelease calls to another thread, we can avoid important threads being
blocked by unexpectedly expensive callbacks.

This commit also changes the way that the coretext shaper's run iterator
builds its string. Rather than using a CFMutableString, an ArrayList of
unichars is built which is passed to CFStringCreateWithCharactersNoCopy,
which is a lot more efficient since it avoids all the CoreFoundation
overhead.
2024-06-14 01:43:02 -04:00
Mitchell Hashimoto
a205e1e2c1 pkg/freetype: use c_ulong which isn't 64-bit on windows 2024-05-28 20:49:21 -07:00
Mitchell Hashimoto
adaeffb2b5 font/freetype: CBDT/CBLC tables imply color 2024-05-28 20:40:46 -07:00
Mitchell Hashimoto
4daa49fe27 font/freetype: update to new presentation APIs 2024-05-28 20:25:49 -07:00
Mitchell Hashimoto
8920f45fd8 font/freetype: API to load font table 2024-05-28 09:48:01 -07:00
Mitchell Hashimoto
1a7cde9e3e font/coretext: can read font tables 2024-05-27 20:23:10 -07:00
Mitchell Hashimoto
9f4d4d3c61 font: treated fonts with mixed color/non-color glyphs as text
Related to #1768 but doesn't fix it properly.

This is a temporary hack to avoid some issues with fonts that have mixed
color/non-color glyphs. If there are mixed presentations and the font
does not have emoji codepoints, then we assume it is text. This fixes
the typical scenarios.

This is not a long term solution. A proper long term solution is to
detect this scenario and on a per-glyph basis handle colorization (or
the lack thereof) correctly. It looks like to do this we'll have to
parse some font tables which is considerably more work so I wanted to do
this first.
2024-05-26 10:17:20 -07:00
Mitchell Hashimoto
a11c7ac785 update Dear Imgui to 1.90.6 2024-05-10 10:17:33 -07:00
Mitchell Hashimoto
3c0703eafb Revert "pkg/libxml2: udpate"
This reverts commit 7df335dde968ed4b80d8bda28f5f971bf8e52510.
2024-05-09 21:05:38 -07:00
Mitchell Hashimoto
12e059d275 pkg/zlib: update 2024-05-09 21:01:08 -07:00
Mitchell Hashimoto
7df335dde9 pkg/libxml2: udpate 2024-05-09 21:00:18 -07:00
Mitchell Hashimoto
240c60b62a pkg/libpng: update 2024-05-09 20:59:28 -07:00
Mitchell Hashimoto
650bf3788f pkg/glslang update 2024-05-09 20:57:28 -07:00
Mitchell Hashimoto
6672568473 pkg/harfbuzz: update 2024-05-09 20:55:02 -07:00
Mitchell Hashimoto
0c0b67c887 pkg/highway: update 2024-05-09 20:53:45 -07:00
Mitchell Hashimoto
8b7bca53c1 pkg/simdutf: update to 5.2.8 2024-05-09 20:50:54 -07:00
Qwerasd
fb913f0d9e Enable libpng in harfbuzz freetype dep
Without this, this replaces the dep on the main level, breaking color glyphs
2024-05-09 00:03:40 -04:00
Mitchell Hashimoto
1cb70d6e40 font/coretext: force LTR shaping 2024-05-08 10:11:57 -07:00
Mitchell Hashimoto
eeb7f7aa02 pkg/macos: add more text APIs 2024-05-08 09:49:16 -07:00
Mitchell Hashimoto
1189817dd8 pkg/macos: CTFontCreateForString 2024-05-05 21:38:19 -07:00
Mitchell Hashimoto
a29a0a1e5c pkg/macos: add more CoreText APIs 2024-05-05 21:01:44 -07:00
Mitchell Hashimoto
cc72e6de23 pkg/macos: display link callback slightly more typesafe 2024-05-04 14:49:49 -07:00
Mitchell Hashimoto
f76af48613 pkg/macos: add CVDisplayLinkSetCurrentCGDisplay 2024-05-04 14:49:49 -07:00
Gordon Cassie
abd782a7aa Fix typo. 2024-04-30 10:20:31 -07:00
Mitchell Hashimoto
595f24585e working on more zig breaking changes 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
026484fea6 fix more comptime var leaks 2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
61d3da1bf6 font/coretext: respect quirks fonts for shaper 2024-04-04 12:02:43 -07:00
Mitchell Hashimoto
290496d7fe pkg/macos: add missing functions to macos/foundation 2024-04-04 11:25:34 -07:00
Krzysztof Wolicki
edaafdf57a build API change: update usage of addCSourceFiles 2024-02-26 18:00:43 +01:00
Mitchell Hashimoto
63ca2c0f0c pkg/apple-sdk: more descriptive error when SDK not found 2024-02-14 08:56:11 -08:00
Mitchell Hashimoto
4ae41579da add utf8proc back for bench 2024-02-08 13:21:36 -08:00
Mitchell Hashimoto
8bbcf6821a pkg: remove unused files, add highway API to get targets 2024-02-05 21:22:28 -08:00
Mitchell Hashimoto
120273aa1a pkg/utfcpp 2024-02-05 21:22:27 -08:00
Mitchell Hashimoto
626d4170fe move simdutf to a pkg 2024-02-05 21:22:27 -08:00
Mitchell Hashimoto
36b0db2a72 pkg/highway 2024-02-05 21:22:26 -08:00
Mitchell Hashimoto
7b3deb13d8 renderer/metal: apply layerContentsPlacement on macOS to fix stretching
Fixes #42
2024-02-02 08:39:08 -08:00
Mitchell Hashimoto
2f5f14df9f pkg/apple-sdk: use std.zig.system.darwin.getSdk 2024-01-26 08:31:30 -08:00
Jakub Konka
f98b5b7417 apple-sdk: use zig's libstd getSdk to get active Apple SDK 2024-01-26 12:04:49 +01:00
Mitchell Hashimoto
8d4416995b build: no more resolved target hack
This was necessary to fix `zig build test` but since #1305 this is not
necessary anymore.
2024-01-15 14:33:56 -08:00
Krzysztof Wolicki
f75558b387 Use addCSourceFiles with dependency instead of manually adding files in a loop 2024-01-15 23:23:41 +01:00
Mitchell Hashimoto
3360a008cd build: build produces a broken object file for iOS
This gets `zig build -Dtarget=aarch64-ios` working. By "working" I mean
it produces an object file without compiler errors. However, the object
file certainly isn't useful since it uses a number of features that will
not work in the iOS sandbox.

This is just an experiment more than anything to see how hard it would be to
get libghostty working within iOS to render a terminal. Note iOS doesn't
support ptys so this wouldn't be a true on-device terminal. The
challenge right now is to just get a terminal rendering (not usable).
2024-01-13 21:38:58 -08:00
Mitchell Hashimoto
29717269ca build: remove tracy completely 2024-01-13 14:30:56 -08:00
Mitchell Hashimoto
c24d7d6de6 pkg/harfbuzz: get zig build test working on macOS 2024-01-10 20:26:41 -08:00
Mitchell Hashimoto
5bca3a4044 pkg/apple-sdk: only exec to get xcode path once per build 2024-01-10 09:35:37 -08:00
Mitchell Hashimoto
41de9c6e97 pkg/apple-sdk: depend on macOS 14 SDK 2024-01-10 09:32:24 -08:00