search for unknown codepoints in any available font face

If an unknown codepoint is rendered, we now will query the OS for ANY
font that can satisfy the codepoint (rather than rendering `?`).
This commit is contained in:
Mitchell Hashimoto
2022-11-17 16:07:20 -08:00
parent da2942e083
commit 08bca077b2
3 changed files with 43 additions and 10 deletions

View File

@@ -175,12 +175,12 @@ pub fn create(alloc: Allocator, app: *App, config: *const Config) !*Window {
errdefer alloc.destroy(font_group);
font_group.* = try font.GroupCache.init(alloc, group: {
var group = try font.Group.init(alloc, font_lib, font_size);
errdefer group.deinit(alloc);
errdefer group.deinit();
// Search for fonts
if (font.Discover != void) {
var disco = font.Discover.init();
defer disco.deinit();
group.discover = disco;
if (config.@"font-family") |family| {
var disco_it = try disco.discover(.{