diff --git a/examples/gkurve/label.zig b/examples/gkurve/label.zig index 789a813a..b20ca799 100644 --- a/examples/gkurve/label.zig +++ b/examples/gkurve/label.zig @@ -96,7 +96,7 @@ fn write(ctx: WriterContext, bytes: []const u8) WriterError!usize { // Add 1 pixel padding to texture to avoid bleeding over other textures var glyph_data = try ctx.label.allocator.alloc(zigimg.color.Rgba32, (glyph_width + 2) * (glyph_height + 2)); defer ctx.label.allocator.free(glyph_data); - const glyph_buffer = glyph_bitmap.buffer(); + const glyph_buffer = glyph_bitmap.buffer().?; for (glyph_data) |*data, i| { const x = i % (glyph_width + 2); const y = i / (glyph_width + 2); diff --git a/examples/gkurve/resizable_label.zig b/examples/gkurve/resizable_label.zig index c86202dc..2ed9789e 100644 --- a/examples/gkurve/resizable_label.zig +++ b/examples/gkurve/resizable_label.zig @@ -102,7 +102,7 @@ fn write(ctx: WriterContext, bytes: []const u8) WriterError!usize { switch (char) { '\n' => { offset[0] = 0; - offset[1] -= @intToFloat(f32, ctx.label.face.sizeMetrics().?.height >> 6); + offset[1] -= @intToFloat(f32, ctx.label.face.size().metrics().height >> 6); std.debug.todo("New line not implemented yet"); }, ' ' => { @@ -123,7 +123,7 @@ fn write(ctx: WriterContext, bytes: []const u8) WriterError!usize { const v = try ctx.label.char_map.getOrPut(char); if (!v.found_existing) { try ctx.label.face.loadChar(char, .{ .no_scale = true, .no_bitmap = true }); - const glyph = ctx.label.face.glyph; + const glyph = ctx.label.face.glyph(); // Use a big scale and then scale to the actual text size const multiplier = 1024 << 6; @@ -167,7 +167,7 @@ fn write(ctx: WriterContext, bytes: []const u8) WriterError!usize { .shift = 0, .delta = 0, }; - try ctx.label.face.glyph.outline().?.decompose(&outline_ctx, callbacks); + try ctx.label.face.glyph().outline().?.decompose(&outline_ctx, callbacks); uniteOutsideAndInsideVertices(&outline_ctx);