mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
font: bold italic fallback has to avoid nested alias entry
This commit is contained in:
@ -282,7 +282,25 @@ pub fn completeStyles(self: *Collection, alloc: Allocator) CompleteError!void {
|
||||
const bold_italic_list = self.faces.getPtr(.bold_italic);
|
||||
if (bold_italic_list.count() == 0) {
|
||||
log.warn("bold italic style not available, using italic font", .{});
|
||||
try bold_italic_list.append(alloc, .{ .alias = italic_list.at(0) });
|
||||
|
||||
// Nested alias isn't allowed so if the italic entry is an
|
||||
// alias then we use the aliased entry.
|
||||
const italic_entry = italic_list.at(0);
|
||||
switch (italic_entry.*) {
|
||||
.alias => |v| try bold_italic_list.append(
|
||||
alloc,
|
||||
.{ .alias = v },
|
||||
),
|
||||
|
||||
.loaded,
|
||||
.fallback_loaded,
|
||||
.deferred,
|
||||
.fallback_deferred,
|
||||
=> try bold_italic_list.append(
|
||||
alloc,
|
||||
.{ .alias = italic_entry },
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user