mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-23 20:26:09 +03:00
font/coretext: do not set variation axes in discovery
This was causing discovery to find some odd fonts under certain scenarios (namely: Recursive Mono). Due to our prior fix in e08eeb2b2ad810c4db22530a181858caee834b22 we no longer need to set variations here for them to stick.
This commit is contained in:
@ -235,21 +235,7 @@ pub const Descriptor = struct {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build our descriptor from attrs
|
return try macos.text.FontDescriptor.createWithAttributes(@ptrCast(attrs));
|
||||||
var desc = try macos.text.FontDescriptor.createWithAttributes(@ptrCast(attrs));
|
|
||||||
errdefer desc.release();
|
|
||||||
|
|
||||||
// Variations are built by copying the descriptor. I don't know a way
|
|
||||||
// to set it on attrs directly.
|
|
||||||
for (self.variations) |v| {
|
|
||||||
const id = try macos.foundation.Number.create(.int, @ptrCast(&v.id));
|
|
||||||
defer id.release();
|
|
||||||
const next = try desc.createCopyWithVariation(id, v.value);
|
|
||||||
desc.release();
|
|
||||||
desc = next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return desc;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user