aboutsummaryrefslogtreecommitdiff
path: root/src/backend_nanovg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend_nanovg.c')
-rw-r--r--src/backend_nanovg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend_nanovg.c b/src/backend_nanovg.c
index 247e4eb..4e4dbb6 100644
--- a/src/backend_nanovg.c
+++ b/src/backend_nanovg.c
@@ -657,12 +657,11 @@ d2tk_nanovg_process(void *data, d2tk_core_t *core, const d2tk_com_t *com,
if(!*sprite)
{
- char *ft_path = NULL;
- assert(asprintf(&ft_path, "%s%s", backend->bundle_path, body->face) != -1);
- assert(ft_path);
+ char ft_path [1024];
+ d2tk_core_get_font_path(core, backend->bundle_path, body->face,
+ sizeof(ft_path), ft_path);
const int face = nvgCreateFont(ctx, body->face, ft_path);
- free(ft_path);
assert(face != -1);
*sprite = (uintptr_t)face;