font: add stylistic variants for built-in font, fix naming convention

Fixes #2364

This adds the bold, italic, and bold italic variants of JB Mono so it is
built-in. This also fixes up the naming convention for the embedded font
files across tests and removes redundant embedded font files.
This commit is contained in:
Mitchell Hashimoto
2024-10-02 14:45:34 -07:00
parent 991cbcec21
commit be3ae56bc8
21 changed files with 116 additions and 90 deletions

View File

@@ -9,6 +9,7 @@ const Allocator = std.mem.Allocator;
const builtin = @import("builtin");
const cimgui = @import("cimgui");
const Surface = @import("../Surface.zig");
const font = @import("../font/main.zig");
const input = @import("../input.zig");
const terminal = @import("../terminal/main.zig");
const inspector = @import("main.zig");
@@ -130,8 +131,8 @@ pub fn setup() void {
font_config.FontDataOwnedByAtlas = false;
_ = cimgui.c.ImFontAtlas_AddFontFromMemoryTTF(
io.Fonts,
@constCast(@ptrCast(Surface.face_ttf)),
Surface.face_ttf.len,
@constCast(@ptrCast(font.embedded.regular)),
font.embedded.regular.len,
font_size,
font_config,
null,