mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-25 14:28:32 +00:00
address review: Discover.init takes a Library across all backends
Per review feedback, drop the `if (Discover == Windows)` comptime branches in SharedGridSet and list_fonts by making every backend's `init` take a Library and ignore it when unused. Call sites just do `Discover.init(self.font_lib)` now. Also adds a discovery test for the Windows backend that looks up Arial and checks the returned face has the 'A' codepoint. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -442,10 +442,7 @@ fn discover(self: *SharedGridSet) !?*Discover {
|
||||
// If we initialized, use it
|
||||
if (self.font_discover) |*v| return v;
|
||||
|
||||
self.font_discover = if (comptime Discover == discovery.Windows)
|
||||
.init(self.font_lib)
|
||||
else
|
||||
.init();
|
||||
self.font_discover = .init(self.font_lib);
|
||||
return &self.font_discover.?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user