windows: avoid fontconfig and ensure build compiles

This commit is contained in:
Jonathan Marler
2026-03-20 10:27:40 -06:00
parent 9c30bfadc5
commit 542d6aa14d
2 changed files with 12 additions and 0 deletions

View File

@@ -744,6 +744,10 @@ jobs:
Write-Host "Zig installed."
.\zig\zig.exe version
- name: Compile build
shell: pwsh
run: .\zig\zig.exe build --help
- name: Generate build testing script
shell: pwsh
run: |

View File

@@ -40,6 +40,14 @@ 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;
}
// macOS also supports "coretext_freetype" but there is no scenario
// that is the default. It is only used by people who want to
// self-compile Ghostty and prefer the freetype aesthetic.