mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-17 07:16:12 +00:00
refactor: make freetype flags void for non-freetype backend
This is an attempt to use `void` as type for Freetype Load Flags when backend does not use these flags.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
const builtin = @import("builtin");
|
||||
|
||||
const formatter = @import("config/formatter.zig");
|
||||
const font = @import("font/main.zig");
|
||||
const options = font.options;
|
||||
pub const Config = @import("config/Config.zig");
|
||||
pub const string = @import("config/string.zig");
|
||||
pub const edit = @import("config/edit.zig");
|
||||
@@ -9,6 +11,18 @@ pub const url = @import("config/url.zig");
|
||||
pub const FileFormatter = formatter.FileFormatter;
|
||||
pub const entryFormatter = formatter.entryFormatter;
|
||||
pub const formatEntry = formatter.formatEntry;
|
||||
pub const FreetypeLoadFlags = switch (options.backend) {
|
||||
.freetype,
|
||||
.fontconfig_freetype,
|
||||
.coretext_freetype,
|
||||
=> Config.FreetypeLoadFlags,
|
||||
|
||||
.coretext,
|
||||
.coretext_harfbuzz,
|
||||
.coretext_noshape,
|
||||
.web_canvas,
|
||||
=> void,
|
||||
};
|
||||
|
||||
// Field types
|
||||
pub const ClipboardAccess = Config.ClipboardAccess;
|
||||
|
Reference in New Issue
Block a user