freetype: update examples
compile error due the last functions rename
This commit is contained in:
parent
0aa9cc4a04
commit
30612500e0
2 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ const OutlinePrinter = struct {
|
||||||
var lib = try freetype.Library.init();
|
var lib = try freetype.Library.init();
|
||||||
return Self{
|
return Self{
|
||||||
.library = lib,
|
.library = lib,
|
||||||
.face = try lib.newFace("upstream/assets/FiraSans-Regular.ttf", 0),
|
.face = try lib.createFace("upstream/assets/FiraSans-Regular.ttf", 0),
|
||||||
.output_file = file,
|
.output_file = file,
|
||||||
.path_stream = std.io.fixedBufferStream(&buf),
|
.path_stream = std.io.fixedBufferStream(&buf),
|
||||||
.xMin = 0,
|
.xMin = 0,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ pub fn main() !void {
|
||||||
const lib = try freetype.Library.init();
|
const lib = try freetype.Library.init();
|
||||||
defer lib.deinit();
|
defer lib.deinit();
|
||||||
|
|
||||||
const face = try lib.newFace("upstream/assets/FiraSans-Regular.ttf", 0);
|
const face = try lib.createFace("upstream/assets/FiraSans-Regular.ttf", 0);
|
||||||
try face.setCharSize(60 * 48, 0, 50, 0);
|
try face.setCharSize(60 * 48, 0, 50, 0);
|
||||||
try face.loadChar(args[1][0], .{ .render = true });
|
try face.loadChar(args[1][0], .{ .render = true });
|
||||||
const bitmap = face.glyph().bitmap();
|
const bitmap = face.glyph().bitmap();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue