const std = @import("std");
const ziglet = @import("ziglet");
const formatter = @import("../formatter.zig");

const gpa = std.heap.page_allocator;

fn cb(input: []const u8) ![]const u8 {
    const font_buffer: []const u8 = @embedFile("small.flf");
    var font = try ziglet.DefaultFont.init(gpa, font_buffer);
    defer font.deinit(gpa);
    const result = try font.formatter().formatText(gpa, input, .{});
    return result;
}

pub const fig = formatter {
    .name = "fig",
    .callback = cb
};
