diff options
| author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2024-04-05 15:15:30 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | 2024-04-05 15:15:30 -0700 |
| commit | 4a29da35257a4e8d823bc1229dd17a42ea5ef163 (patch) | |
| tree | 739c157b76f227b1b8765b1115b5fd6691389bfa /src/font/Collection.zig | |
| parent | 719c5d7c2504ce06744d401a6309ff68c19aa095 (diff) | |
font: SharedGridSet clarify memory ownership
Diffstat (limited to 'src/font/Collection.zig')
| -rw-r--r-- | src/font/Collection.zig | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/font/Collection.zig b/src/font/Collection.zig index f75356bc9..89d4aee4c 100644 --- a/src/font/Collection.zig +++ b/src/font/Collection.zig @@ -263,18 +263,17 @@ pub const LoadOptions = struct { /// The desired font size for all loaded faces. size: DesiredSize = .{ .points = 12 }, - /// The metric modifiers to use for all loaded faces. If this is - /// set then the memory is owned by the collection and will be - /// freed when the collection is deinitialized. The modifier set - /// must use the same allocator as the collection. + /// The metric modifiers to use for all loaded faces. The memory + /// for this is owned by the user and is not freed by the collection. metric_modifiers: Metrics.ModifierSet = .{}, pub fn deinit(self: *LoadOptions, alloc: Allocator) void { - self.metric_modifiers.deinit(alloc); + _ = self; + _ = alloc; } /// The options to use for loading faces. - fn faceOptions(self: *const LoadOptions) font.face.Options { + pub fn faceOptions(self: *const LoadOptions) font.face.Options { return .{ .size = self.size, .metric_modifiers = &self.metric_modifiers, |
