summaryrefslogtreecommitdiff
path: root/dev/gui/gui.zig
diff options
context:
space:
mode:
Diffstat (limited to 'dev/gui/gui.zig')
-rw-r--r--dev/gui/gui.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig
index a632f67a..f9dae69c 100644
--- a/dev/gui/gui.zig
+++ b/dev/gui/gui.zig
@@ -610,7 +610,7 @@ fn syncReplicaFont(g: *Gui, f: *const @FieldType(pardes.config.Runtime, "font"),
log.warn("the session's font is not installed here: {s}", .{name});
return false;
};
- const bytes = filesystem.readFile(gpa, face.path) catch return false;
+ const bytes = filesystem.readFile(&pardes.tape.none, gpa, face.path) catch return false;
if (!g.atlas.setFont(gpa, bytes)) return false;
if (f.requested_size_hundredths != 0)
g.px = @as(f32, @floatFromInt(f.requested_size_hundredths)) / 100;
@@ -626,7 +626,7 @@ fn loadFallbackFonts(g: *Gui, gpa: std.mem.Allocator) void {
defer arena_state.deinit();
for (fonts.fallbacks(arena_state.allocator())) |candidate| {
if (g.atlas.fallback_count == max_fallback_fonts) break;
- const bytes = filesystem.readFile(gpa, candidate.path) catch continue;
+ const bytes = filesystem.readFile(&pardes.tape.none, gpa, candidate.path) catch continue;
_ = g.atlas.addFallback(gpa, bytes, true);
}
}
@@ -1051,7 +1051,7 @@ fn localSession(
var core = if (upgrade.resumed) |*rec|
try upgrade.load(gpa, allocs.pardes, opts, rec)
else if (opts.load_path) |lp| blk: {
- const bytes = try @import("core").filesystem.readFile(gpa, lp);
+ const bytes = try @import("core").filesystem.readFile(&pardes.tape.none, gpa, lp);
defer gpa.free(bytes);
break :blk try pardes.dump.initFromDump(allocs.pardes, opts, bytes);
} else try pardes.Pardes.init(allocs.pardes, opts);
@@ -3054,7 +3054,7 @@ fn pollFrame(ctx: ?*anyopaque) void {
frame_probe.?.period_ns = refreshNs(g);
syncTaglineFont(g, core);
if (core.takeFontRequest()) |path| blk: {
- const bytes = filesystem.readFile(s.gpa, path) catch {
+ const bytes = filesystem.readFile(&pardes.tape.none, s.gpa, path) catch {
core.rejectFont();
break :blk;
};
@@ -6168,7 +6168,7 @@ test "FreeType and HarfBuzz allocate from the gui allocator and give it all back
try std.testing.expect(!atlas.substitutes(0, atlas.glyphForCodepoint('-').glyph));
// A font with ligatures runs the whole HarfBuzz pass.
- const bytes = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
+ const bytes = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
defer std.testing.allocator.free(bytes);
var maple = try Atlas.init(std.testing.allocator, bytes);
defer maple.deinit(std.testing.allocator);
@@ -6261,7 +6261,7 @@ test "installed Nerd Symbols fallback covers Yazi directory icons" {
if (std.mem.eql(u8, font.name, "SymbolsNerdFont-Regular")) break font;
} else return;
- const bytes = try filesystem.readFile(std.testing.allocator, candidate.path);
+ const bytes = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, candidate.path);
defer std.testing.allocator.free(bytes);
var atlas = try Atlas.init(std.testing.allocator, bytes);
defer atlas.deinit(std.testing.allocator);
@@ -7491,7 +7491,7 @@ test "insert cursor overlays without replacing the character beneath it" {
}
test "a ligature draws across its cells, one slice each, and comes apart under the cursor" {
- const bytes = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
+ const bytes = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
defer std.testing.allocator.free(bytes);
var g = try textTestGui(bytes, 27);
defer font_allocator = std.heap.smp_allocator;
@@ -8287,7 +8287,7 @@ test "the atlas's bytes: a fixed key list at 27 px and at 54 px (2x) rasterizes
// move (.scratch/sketch/briefs/gpu-s0.md); a change here is a change
// to every frame.
const want = [2][2]u64{ .{ 0xa03053f14e2c5472, 0x9029886b638b07d5 }, .{ 0xcbaa53a0103aaff5, 0x7563d69768f7d867 } };
- const maple = try filesystem.readFile(std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
+ const maple = try filesystem.readFile(&pardes.tape.none, std.testing.allocator, "assets/MapleMono-NF-Regular.ttf");
defer std.testing.allocator.free(maple);
defer display_scale = 1;
var got: [2][2]u64 = undefined;