summaryrefslogtreecommitdiff
path: root/src/tangara/lua/lua_font.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-07-03 10:43:54 +1000
committerjacqueline <me@jacqueline.id.au>2024-07-03 10:43:54 +1000
commit88ac96242f0d36e53876ece9f90baf776616f0bc (patch)
tree4a937dd3f5f0178e91d5b797a276187a0fa7b64b /src/tangara/lua/lua_font.hpp
parentcbcf1bea617a8f57fe80264e4b96da9274d133f0 (diff)
downloadtangara-fw-88ac96242f0d36e53876ece9f90baf776616f0bc.tar.gz
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.
Diffstat (limited to 'src/tangara/lua/lua_font.hpp')
-rw-r--r--src/tangara/lua/lua_font.hpp15
1 files changed, 15 insertions, 0 deletions
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 <me@jacqueline.id.au>
+ *
+ * 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;
+
+}