format
Parameters
- self:*const Font
- *const Font
- writer:*std.Io.Writer
- *std.Io.Writer
Source
Implementation
pub fn format(self: *const Font, writer: *std.Io.Writer) !void {
const weight = switch (self.weight) {
.normal => "",
.bold => " Bold",
};
const style = switch (self.style) {
.normal => "",
.italic => " Italic",
};
try writer.print("{s}{s}{s} {d}", .{ self.familyName(), weight, style, self.size });
}