font/coretext: allow setting a non-monospace font explicitly

This changes our font discovery to not filter out monospace and updates
our scoring mechanism to prefer monospace.
This commit is contained in:
Mitchell Hashimoto
2023-10-05 08:39:48 -07:00
parent 7a0b8a6781
commit 224b39b86e
2 changed files with 40 additions and 9 deletions

View File

@@ -90,6 +90,7 @@ fn runArgs(alloc_gpa: Allocator, argsIter: anytype) !u8 {
.style = config.style,
.bold = config.bold,
.italic = config.italic,
.monospace = config.family == null,
});
defer disco_it.deinit();
while (try disco_it.next()) |face| {