summaryrefslogtreecommitdiff
path: root/src/wayclock.cc
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-11 11:33:40 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-11 11:33:40 +0100
commit3b2636cbc666159f0962f7b6024d6a85743d6594 (patch)
tree19a8dcb848ce0596f7257ec00a54b6b1aad963a5 /src/wayclock.cc
parent16dc21cd1a820b49901df69ab3f21da1ddc69476 (diff)
loading font
Diffstat (limited to 'src/wayclock.cc')
-rw-r--r--src/wayclock.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wayclock.cc b/src/wayclock.cc
index d089ea6..0852176 100644
--- a/src/wayclock.cc
+++ b/src/wayclock.cc
@@ -10,6 +10,7 @@
#define WAYC_APP_NAME "Wayclock"
#define WAYC_APP_WIDTH 1280
#define WAYC_APP_HEIGHT 1080
+#define WAYC_FONT "AdwaitaMono-Regular.ttf"
struct app_s {
struct renderer_s* renderer;
@@ -61,6 +62,12 @@ int main() {
wayc_defer(wayc_font_context_deinit(&fctx));
+ struct font_s font;
+ if (wayc_font_init(&font, &fctx, WAYC_FONT) != FONT_ERROR_NONE)
+ wayc_panic("Failed to load font");
+
+ wayc_defer(wayc_font_deinit(&font));
+
struct eventloop_s loop;
if (wayc_eventloop_init(&loop, wayc_handle) != EVENTLOOP_ERROR_NONE)
wayc_panic("Failed to initialize event loop");