Allocator memes

This commit is contained in:
krzosa
2025-12-30 10:09:46 +01:00
parent 187bbcc5fc
commit a57ebb49be
8 changed files with 122 additions and 50 deletions

View File

@@ -107,11 +107,11 @@ Glyph *GetGlyph(Font *font, uint32_t codepoint) {
}
Font CreateFont(Atlas *atlas, int32_t size, String path) {
Allocator allocator = GetSystemAllocator();
Scratch scratch;
Scratch scratch;
Font result = {};
Font result = {};
result.glyphs.allocator = allocator;
String file = ReadFile(scratch, path);
String file = ReadFile(scratch, path);
if (file.len == 0) {
file = BakedInFont;
Assert(file.len != 0);