mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
fix: use ternary if expression and correct types
This commit is contained in:
@ -463,18 +463,7 @@ pub const DerivedConfig = struct {
|
||||
.@"adjust-strikethrough-position" = config.@"adjust-strikethrough-position",
|
||||
.@"adjust-strikethrough-thickness" = config.@"adjust-strikethrough-thickness",
|
||||
.@"adjust-cursor-thickness" = config.@"adjust-cursor-thickness",
|
||||
.@"freetype-load-flags" = switch (font.options.backend) {
|
||||
.freetype,
|
||||
.fontconfig_freetype,
|
||||
.coretext_freetype,
|
||||
=> config.@"freetype-load-flags",
|
||||
|
||||
.coretext,
|
||||
.coretext_harfbuzz,
|
||||
.coretext_noshape,
|
||||
.web_canvas,
|
||||
=> {},
|
||||
},
|
||||
.@"freetype-load-flags" = if (comptime font.options.backend.hasFreetype()) config.@"freetype-load-flags" else {},
|
||||
|
||||
// This must be last so the arena contains all our allocations
|
||||
// from above since Zig does assignment in order.
|
||||
@ -514,7 +503,7 @@ pub const Key = struct {
|
||||
/// font grid.
|
||||
font_size: DesiredSize = .{ .points = 12 },
|
||||
|
||||
load_flags: configpkg.FreetypeLoadFlags = font.face.freetype_load_flags_default,
|
||||
load_flags: font.face.FreetypeLoadFlags = font.face.freetype_load_flags_default,
|
||||
|
||||
const style_offsets_len = std.enums.directEnumArrayLen(Style, 0);
|
||||
const StyleOffsets = [style_offsets_len]usize;
|
||||
|
Reference in New Issue
Block a user