mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-20 12:01:34 +00:00
refactor(font): move ownership of Metrics to Collection
This sets the stage for dynamically adjusting the sizes of fallback fonts based on the primary font's face metrics. It also removes a lot of unnecessary work when loading fallback fonts, since we only actually use the metrics based on the parimary font.
This commit is contained in:
@@ -167,13 +167,13 @@ fn collection(
|
||||
const load_options: Collection.LoadOptions = .{
|
||||
.library = self.font_lib,
|
||||
.size = size,
|
||||
.metric_modifiers = key.metric_modifiers,
|
||||
.freetype_load_flags = key.freetype_load_flags,
|
||||
};
|
||||
|
||||
var c = Collection.init();
|
||||
errdefer c.deinit(self.alloc);
|
||||
c.load_options = load_options;
|
||||
c.metric_modifiers = key.metric_modifiers;
|
||||
|
||||
// Search for fonts
|
||||
if (Discover != void) discover: {
|
||||
|
||||
Reference in New Issue
Block a user