Start scaffolding web_canvas backend

This commit is contained in:
Mitchell Hashimoto
2022-11-30 15:05:09 -08:00
parent 6b101c2293
commit b858aea124
7 changed files with 117 additions and 35 deletions

View File

@@ -68,6 +68,8 @@ pub fn deinit(self: *DeferredFace) void {
.fontconfig_freetype => if (self.fc) |*fc| fc.deinit(),
.coretext => if (self.ct) |*ct| ct.deinit(),
.freetype => {},
// TODO
.web_canvas => unreachable,
}
self.* = undefined;
}
@@ -90,6 +92,9 @@ pub fn name(self: DeferredFace) ![:0]const u8 {
},
.freetype => {},
// TODO
.web_canvas => unreachable,
}
return "TODO: built-in font names";
@@ -122,6 +127,9 @@ pub fn load(
return;
},
// TODO
.web_canvas => unreachable,
// Unreachable because we must be already loaded or have the
// proper configuration for one of the other deferred mechanisms.
.freetype => unreachable,
@@ -245,6 +253,9 @@ pub fn hasCodepoint(self: DeferredFace, cp: u32, p: ?Presentation) bool {
}
},
// TODO
.web_canvas => unreachable,
.freetype => {},
}