mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
font: fontconfig adaptations to new api
This commit is contained in:
@ -360,13 +360,13 @@ test "fontconfig" {
|
||||
defer def.deinit();
|
||||
|
||||
// Verify we can get the name
|
||||
const n = try def.name();
|
||||
var buf: [1024]u8 = undefined;
|
||||
const n = try def.name(&buf);
|
||||
try testing.expect(n.len > 0);
|
||||
|
||||
// Load it and verify it works
|
||||
try def.load(lib, .{ .points = 12 });
|
||||
try testing.expect(def.hasCodepoint(' ', null));
|
||||
try testing.expect(def.face.?.glyphIndex(' ') != null);
|
||||
const face = try def.load(lib, .{ .points = 12 });
|
||||
try testing.expect(face.glyphIndex(' ') != null);
|
||||
}
|
||||
|
||||
test "coretext" {
|
||||
|
@ -638,7 +638,7 @@ test "discover monospace with fontconfig and freetype" {
|
||||
defer lib.deinit();
|
||||
var group = try init(alloc, lib, .{ .points = 12 });
|
||||
defer group.deinit();
|
||||
try group.addFace(.regular, (try it.next()).?);
|
||||
try group.addFace(.regular, .{ .deferred = (try it.next()).? });
|
||||
|
||||
// Should find all visible ASCII
|
||||
var atlas_greyscale = try font.Atlas.init(alloc, 512, .greyscale);
|
||||
|
@ -217,7 +217,6 @@ pub const Fontconfig = struct {
|
||||
defer self.i += 1;
|
||||
|
||||
return DeferredFace{
|
||||
.face = null,
|
||||
.fc = .{
|
||||
.pattern = font_pattern,
|
||||
.charset = (try font_pattern.get(.charset, 0)).char_set,
|
||||
|
Reference in New Issue
Block a user