diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-07 18:29:21 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-07 18:29:21 +0300 |
| commit | dcfe11a7588fcd42471159453810abc9b7720a57 (patch) | |
| tree | c32a77266028e73ca2382b96c96f8438a5fcd621 /vendor/libghostty-vt/src/font/backend.zig | |
| parent | 2dfed860103c4e4505ac7f25def9fe37da1e1e6a (diff) | |
build: update libghostty-vt vendor
vendor ghostty 063ac3e and remove the musl libc++ link workaround.
expose the new selection formatter and hyperlink uri apis for follow-up rendering work.
add manual artifact validation for static linux builds.
Diffstat (limited to 'vendor/libghostty-vt/src/font/backend.zig')
| -rw-r--r-- | vendor/libghostty-vt/src/font/backend.zig | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/vendor/libghostty-vt/src/font/backend.zig b/vendor/libghostty-vt/src/font/backend.zig index d24edec7..867421de 100644 --- a/vendor/libghostty-vt/src/font/backend.zig +++ b/vendor/libghostty-vt/src/font/backend.zig @@ -6,6 +6,12 @@ pub const Backend = enum { /// FreeType for font rendering with no font discovery enabled. freetype, + /// FreeType for font rendering with a built-in Windows font directory + /// scanner (C:\Windows\Fonts + %LOCALAPPDATA%\Microsoft\Windows\Fonts). + /// Used when DirectWrite is not available; matches by family_name and + /// SFNT name table without any external index. + freetype_windows, + /// Fontconfig for font discovery and FreeType for font rendering. fontconfig_freetype, @@ -42,10 +48,10 @@ pub const Backend = enum { if (target.os.tag == .windows) { // Avoid fontconfig on Windows because its libxml2 dependency - // may not unpack due to symlinks. Use plain freetype for now - // which means no font discovery. Full solution would likely use - // DirectWrite which has its own discovery API. - return .freetype; + // may not unpack due to symlinks. Use the FreeType-based + // Windows font-directory scanner for discovery. A future + // DirectWrite backend can replace this if needed. + return .freetype_windows; } // macOS also supports "coretext_freetype" but there is no scenario @@ -60,6 +66,7 @@ pub const Backend = enum { pub fn hasFreetype(self: Backend) bool { return switch (self) { .freetype, + .freetype_windows, .fontconfig_freetype, .coretext_freetype, => true, @@ -81,6 +88,7 @@ pub const Backend = enum { => true, .freetype, + .freetype_windows, .fontconfig_freetype, .web_canvas, => false, @@ -92,6 +100,7 @@ pub const Backend = enum { .fontconfig_freetype => true, .freetype, + .freetype_windows, .coretext, .coretext_freetype, .coretext_harfbuzz, @@ -104,6 +113,7 @@ pub const Backend = enum { pub fn hasHarfbuzz(self: Backend) bool { return switch (self) { .freetype, + .freetype_windows, .fontconfig_freetype, .coretext_freetype, .coretext_harfbuzz, |
