App prepare for multi-window

This commit is contained in:
Mitchell Hashimoto
2022-11-06 10:05:08 -08:00
parent 91d165f4f9
commit a2edbb4698
2 changed files with 79 additions and 10 deletions

View File

@@ -136,6 +136,10 @@ pub fn create(alloc: Allocator, config: *const Config) !*Window {
};
// Find all the fonts for this window
//
// Future: we can share the font group amongst all windows to save
// some new window init time and some memory. This will require making
// thread-safe changes to font structs.
var font_lib = try font.Library.init();
errdefer font_lib.deinit();
var font_group = try alloc.create(font.GroupCache);