catch null font, report it as unimplemented

This commit is contained in:
veclavtalica 2025-02-02 04:12:56 +03:00
parent 6d58e964bc
commit 2f629433aa

View File

@ -289,6 +289,11 @@ void text_cache_reset_arena(TextCache *cache) {
void draw_text(const char *string, Vec2 position, float height, Color color, const char *font) {
if (!font) {
log_warn("Default font isn't yet implemented");
return;
}
ensure_font_cache(font, (int)height);
/* the original string might not be around by the time it's used, so copy it */