|
|
|
|
|
|
35
|
defer c.TTF_Quit();
|
35
|
defer c.TTF_Quit();
|
|
36
|
|
36
|
|
|
37
|
var font_file = if (args.len > 1) args[1] else "./FantasqueSansMono-Regular.ttf";
|
37
|
var font_file = if (args.len > 1) args[1] else "./FantasqueSansMono-Regular.ttf";
|
|
38
|
const font = c.TTF_OpenFont(font_file, 20) orelse {
|
|
|
|
|
|
38
|
const font = c.TTF_OpenFont(font_file, 16) orelse {
|
|
39
|
c.SDL_Log("Unable to load font: %s", c.TTF_GetError());
|
39
|
c.SDL_Log("Unable to load font: %s", c.TTF_GetError());
|
|
40
|
return error.TTFInitializationFailed;
|
40
|
return error.TTFInitializationFailed;
|
|
41
|
};
|
41
|
};
|