mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Fix invalid c types with fontconfig
This commit is contained in:
@ -29,7 +29,7 @@ pub const Pattern = opaque {
|
||||
pub fn add(self: *Pattern, prop: Property, value: Value, append: bool) bool {
|
||||
return c.FcPatternAdd(
|
||||
self.cval(),
|
||||
prop.cval(),
|
||||
prop.cval().ptr,
|
||||
value.cval(),
|
||||
if (append) c.FcTrue else c.FcFalse,
|
||||
) == c.FcTrue;
|
||||
@ -39,7 +39,7 @@ pub const Pattern = opaque {
|
||||
var val: c.struct__FcValue = undefined;
|
||||
try @intToEnum(Result, c.FcPatternGet(
|
||||
self.cval(),
|
||||
prop.cval(),
|
||||
prop.cval().ptr,
|
||||
@intCast(c_int, id),
|
||||
&val,
|
||||
)).toError();
|
||||
|
@ -57,7 +57,7 @@ pub const Value = union(Type) {
|
||||
.@"void" => undefined,
|
||||
.integer => |v| .{ .i = @intCast(c_int, v) },
|
||||
.double => |v| .{ .d = v },
|
||||
.string => |v| .{ .s = v },
|
||||
.string => |v| .{ .s = v.ptr },
|
||||
.@"bool" => |v| .{ .b = if (v) c.FcTrue else c.FcFalse },
|
||||
.matrix => |v| .{ .m = @ptrCast(*const c.struct__FcMatrix, v) },
|
||||
.char_set => |v| .{ .c = @ptrCast(*const c.struct__FcCharSet, v) },
|
||||
|
Reference in New Issue
Block a user