mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +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-position" = config.@"adjust-strikethrough-position",
|
||||||
.@"adjust-strikethrough-thickness" = config.@"adjust-strikethrough-thickness",
|
.@"adjust-strikethrough-thickness" = config.@"adjust-strikethrough-thickness",
|
||||||
.@"adjust-cursor-thickness" = config.@"adjust-cursor-thickness",
|
.@"adjust-cursor-thickness" = config.@"adjust-cursor-thickness",
|
||||||
.@"freetype-load-flags" = switch (font.options.backend) {
|
.@"freetype-load-flags" = if (comptime font.options.backend.hasFreetype()) config.@"freetype-load-flags" else {},
|
||||||
.freetype,
|
|
||||||
.fontconfig_freetype,
|
|
||||||
.coretext_freetype,
|
|
||||||
=> config.@"freetype-load-flags",
|
|
||||||
|
|
||||||
.coretext,
|
|
||||||
.coretext_harfbuzz,
|
|
||||||
.coretext_noshape,
|
|
||||||
.web_canvas,
|
|
||||||
=> {},
|
|
||||||
},
|
|
||||||
|
|
||||||
// This must be last so the arena contains all our allocations
|
// This must be last so the arena contains all our allocations
|
||||||
// from above since Zig does assignment in order.
|
// from above since Zig does assignment in order.
|
||||||
@ -514,7 +503,7 @@ pub const Key = struct {
|
|||||||
/// font grid.
|
/// font grid.
|
||||||
font_size: DesiredSize = .{ .points = 12 },
|
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 style_offsets_len = std.enums.directEnumArrayLen(Style, 0);
|
||||||
const StyleOffsets = [style_offsets_len]usize;
|
const StyleOffsets = [style_offsets_len]usize;
|
||||||
|
Reference in New Issue
Block a user