mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-27 17:41:40 +00:00
some tweaks
This commit is contained in:
@@ -168,7 +168,7 @@ fn collection(
|
||||
.library = self.font_lib,
|
||||
.size = size,
|
||||
.metric_modifiers = key.metric_modifiers,
|
||||
.freetype_load_flags = config.@"freetype-load-flags",
|
||||
.freetype_load_flags = key.freetype_load_flags,
|
||||
};
|
||||
|
||||
var c = Collection.init();
|
||||
@@ -463,7 +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" = if (comptime font.options.backend.hasFreetype()) config.@"freetype-load-flags" else {},
|
||||
.@"freetype-load-flags" = if (font.face.FreetypeLoadFlags != void) config.@"freetype-load-flags" else {},
|
||||
|
||||
// This must be last so the arena contains all our allocations
|
||||
// from above since Zig does assignment in order.
|
||||
@@ -503,7 +503,9 @@ pub const Key = struct {
|
||||
/// font grid.
|
||||
font_size: DesiredSize = .{ .points = 12 },
|
||||
|
||||
load_flags: font.face.FreetypeLoadFlags = font.face.freetype_load_flags_default,
|
||||
/// The freetype load flags configuration, only non-void if the
|
||||
/// freetype backend is enabled.
|
||||
freetype_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;
|
||||
@@ -623,7 +625,10 @@ pub const Key = struct {
|
||||
.codepoint_map = codepoint_map,
|
||||
.metric_modifiers = metric_modifiers,
|
||||
.font_size = font_size,
|
||||
.load_flags = config.@"freetype-load-flags",
|
||||
.freetype_load_flags = if (font.face.FreetypeLoadFlags != void)
|
||||
config.@"freetype-load-flags"
|
||||
else
|
||||
font.face.freetype_load_flags_default,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -653,7 +658,7 @@ pub const Key = struct {
|
||||
for (self.descriptors) |d| d.hash(hasher);
|
||||
self.codepoint_map.hash(hasher);
|
||||
autoHash(hasher, self.metric_modifiers.count());
|
||||
autoHash(hasher, self.load_flags);
|
||||
autoHash(hasher, self.freetype_load_flags);
|
||||
if (self.metric_modifiers.count() > 0) {
|
||||
inline for (@typeInfo(Metrics.Key).Enum.fields) |field| {
|
||||
const key = @field(Metrics.Key, field.name);
|
||||
|
||||
Reference in New Issue
Block a user