From 88ac96242f0d36e53876ece9f90baf776616f0bc Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 3 Jul 2024 10:43:54 +1000 Subject: Load fonts asynchronously on a bg task This saves a second or two from bootup; AFAICT this *mostly* reclaims the dynamic fonts boot time regression. --- src/tangara/lua/lua_font.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/tangara/lua/lua_font.hpp (limited to 'src/tangara/lua/lua_font.hpp') diff --git a/src/tangara/lua/lua_font.hpp b/src/tangara/lua/lua_font.hpp new file mode 100644 index 00000000..dfec4eb0 --- /dev/null +++ b/src/tangara/lua/lua_font.hpp @@ -0,0 +1,15 @@ +/* + * Copyright 2024 jacqueline + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#pragma once + +#include "lua.hpp" + +namespace lua { + +auto loadFont(lua_State* L, const char* name, int cb_ref) -> void; + +} -- cgit v1.2.3