examples/gkurve: update to latest freetype API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-06-10 13:18:08 -07:00 committed by Stephen Gutekanst
parent 112b837cae
commit 53a1a2e9fd
2 changed files with 4 additions and 4 deletions

View file

@ -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);