summaryrefslogtreecommitdiff
path: root/src/fonts.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/fonts.zig')
-rw-r--r--src/fonts.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fonts.zig b/src/fonts.zig
index 84ce5307..540e3a60 100644
--- a/src/fonts.zig
+++ b/src/fonts.zig
@@ -76,9 +76,9 @@ pub fn list(arena: std.mem.Allocator, want_name: ?[]const u8) []const Font {
return scan(arena, null, true);
}
-/// A remote config's absolute font path belongs to its machine. Resolve the
-/// same face by name on this machine, retaining the filename as a fallback.
-pub fn remote(arena: std.mem.Allocator, path: []const u8, name: []const u8) ?Font {
+/// The session's config's absolute font path belongs to the session's machine.
+/// Resolve the same face by name on this machine, retaining the filename as a fallback.
+pub fn fromSession(arena: std.mem.Allocator, path: []const u8, name: []const u8) ?Font {
if (name.len > 0) {
const matches = list(arena, name);
if (matches.len > 0) return matches[0];
@@ -421,7 +421,7 @@ test "the walk finds this machine's monospace faces" {
}
}
-test "a remote font config resolves the installed face despite another machine's path" {
+test "the session's font config resolves the installed face despite another machine's path" {
var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
defer arena.deinit();
const alloc = arena.allocator();
@@ -429,8 +429,8 @@ test "a remote font config resolves the installed face despite another machine's
if (installed.len == 0) return error.SkipZigTest;
const face = installed[0];
const foreign = try std.fmt.allocPrint(alloc, "/other-machine/fonts/{s}", .{std.Io.Dir.path.basename(face.path)});
- const by_name = remote(alloc, foreign, face.name) orelse return error.MissingLocalFace;
+ const by_name = fromSession(alloc, foreign, face.name) orelse return error.MissingLocalFace;
try std.testing.expectEqualStrings(face.path, by_name.path);
- const by_file = remote(alloc, foreign, "") orelse return error.MissingLocalFace;
+ const by_file = fromSession(alloc, foreign, "") orelse return error.MissingLocalFace;
try std.testing.expectEqualStrings(face.path, by_file.path);
}