mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
font/fontconfig: adhere to correct function signature
This commit is contained in:
@ -379,6 +379,7 @@ test "fontconfig" {
|
||||
|
||||
const discovery = @import("main.zig").discovery;
|
||||
const testing = std.testing;
|
||||
const alloc = testing.allocator;
|
||||
|
||||
// Load freetype
|
||||
var lib = try Library.init();
|
||||
@ -387,7 +388,7 @@ test "fontconfig" {
|
||||
// Get a deferred face from fontconfig
|
||||
var def = def: {
|
||||
var fc = discovery.Fontconfig.init();
|
||||
var it = try fc.discover(.{ .family = "monospace", .size = 12 });
|
||||
var it = try fc.discover(alloc, .{ .family = "monospace", .size = 12 });
|
||||
defer it.deinit();
|
||||
break :def (try it.next()).?;
|
||||
};
|
||||
|
@ -835,7 +835,7 @@ test "discover monospace with fontconfig and freetype" {
|
||||
|
||||
// Search for fonts
|
||||
var fc = Discover.init();
|
||||
var it = try fc.discover(.{ .family = "monospace", .size = 12 });
|
||||
var it = try fc.discover(alloc, .{ .family = "monospace", .size = 12 });
|
||||
defer it.deinit();
|
||||
|
||||
// Initialize the group with the deferred face
|
||||
|
@ -234,7 +234,9 @@ pub const Fontconfig = struct {
|
||||
|
||||
/// Discover fonts from a descriptor. This returns an iterator that can
|
||||
/// be used to build up the deferred fonts.
|
||||
pub fn discover(self: *const Fontconfig, desc: Descriptor) !DiscoverIterator {
|
||||
pub fn discover(self: *const Fontconfig, alloc: Allocator, desc: Descriptor) !DiscoverIterator {
|
||||
_ = alloc;
|
||||
|
||||
// Build our pattern that we'll search for
|
||||
const pat = desc.toFcPattern();
|
||||
errdefer pat.destroy();
|
||||
|
Reference in New Issue
Block a user