font: Collection deinit

This commit is contained in:
Mitchell Hashimoto
2024-04-02 11:16:50 -07:00
parent 0d0688404e
commit 40b4183b1f

View File

@ -42,7 +42,7 @@ pub fn deinit(self: *Collection, alloc: Allocator) void {
entry.value.deinit(alloc);
}
//self.load_options.deinit(alloc);
if (self.load_options) |*v| v.deinit(alloc);
}
pub const AddError = Allocator.Error || error{
@ -164,6 +164,10 @@ pub const LoadOptions = struct {
/// must use the same allocator as the collection.
metric_modifiers: Metrics.ModifierSet = .{},
pub fn deinit(self: *LoadOptions, alloc: Allocator) void {
self.metric_modifiers.deinit(alloc);
}
/// The options to use for loading faces.
fn faceOptions(self: *const LoadOptions) font.face.Options {
return .{