mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-04 10:54:48 +00:00
build: do not build/link harfbuzz on macOS
This commit is contained in:
@@ -28,7 +28,7 @@ pub const Face = struct {
|
||||
|
||||
/// True if our build is using Harfbuzz. If we're not, we can avoid
|
||||
/// some Harfbuzz-specific code paths.
|
||||
const harfbuzz_shaper = font.Shaper == font.shape.harfbuzz.Shaper;
|
||||
const harfbuzz_shaper = font.options.backend.hasHarfbuzz();
|
||||
|
||||
/// The matrix applied to a regular font to auto-italicize it.
|
||||
pub const italic_skew = macos.graphics.AffineTransform{
|
||||
|
||||
@@ -115,6 +115,19 @@ pub const Backend = enum {
|
||||
=> false,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn hasHarfbuzz(self: Backend) bool {
|
||||
return switch (self) {
|
||||
.freetype,
|
||||
.fontconfig_freetype,
|
||||
.coretext_freetype,
|
||||
=> true,
|
||||
|
||||
.coretext,
|
||||
.web_canvas,
|
||||
=> false,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/// The styles that a family can take.
|
||||
|
||||
@@ -256,7 +256,9 @@ pub const GlobalState = struct {
|
||||
std.log.info("ghostty build optimize={s}", .{build_config.mode_string});
|
||||
std.log.info("runtime={}", .{build_config.app_runtime});
|
||||
std.log.info("font_backend={}", .{build_config.font_backend});
|
||||
std.log.info("dependency harfbuzz={s}", .{harfbuzz.versionString()});
|
||||
if (comptime build_config.font_backend.hasHarfbuzz()) {
|
||||
std.log.info("dependency harfbuzz={s}", .{harfbuzz.versionString()});
|
||||
}
|
||||
if (comptime build_config.font_backend.hasFontconfig()) {
|
||||
std.log.info("dependency fontconfig={d}", .{fontconfig.version()});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user