aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-12-01 12:43:51 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-12-01 12:43:51 +0000
commitfd9c28464db8e3f334819ec9d773bf31ed37c088 (patch)
treefad92ce613f2dda24cef9f096026578391e905ab
parentmeson: tllist: try subproject first, then fallback to system dependency (diff)
fcft: use fcft instead of local copy of font.c/font.h
-rw-r--r--.gitmodules3
-rw-r--r--config.h3
-rw-r--r--main.c3
-rw-r--r--meson.build10
-rw-r--r--render.c3
m---------subprojects/fcft0
-rw-r--r--terminal.h5
-rw-r--r--wayland.h3
8 files changed, 22 insertions, 8 deletions
diff --git a/.gitmodules b/.gitmodules
index 1649f01b..a4a614b8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "subprojects/tllist"]
path = subprojects/tllist
url = https://codeberg.org/dnkl/tllist.git
+[submodule "subprojects/fcft"]
+ path = subprojects/fcft
+ url = https://codeberg.org/dnkl/fcft.git
diff --git a/config.h b/config.h
index 34373969..0db130ad 100644
--- a/config.h
+++ b/config.h
@@ -3,8 +3,9 @@
#include <stdint.h>
#include <stdbool.h>
+#include <tllist.h>
+
#include "terminal.h"
-#include "tllist.h"
struct config {
char *term;
diff --git a/main.c b/main.c
index d41a49e5..7ec6e945 100644
--- a/main.c
+++ b/main.c
@@ -10,13 +10,14 @@
#include <sys/sysinfo.h>
+#include <fcft.h>
+
#define LOG_MODULE "main"
#define LOG_ENABLE_DBG 0
#include "log.h"
#include "config.h"
#include "fdm.h"
-#include "font.h"
#include "server.h"
#include "shm.h"
#include "terminal.h"
diff --git a/meson.build b/meson.build
index f97cd609..fe33d497 100644
--- a/meson.build
+++ b/meson.build
@@ -69,6 +69,13 @@ else
tllist = dependency('tllist')
endif
+fcft_proj = subproject('fcft')
+if fcft_proj.found()
+ fcft = fcft_proj.get_variable('fcft')
+else
+ fcft = dependency('fcft')
+endif
+
executable(
'foot',
'async.c', 'async.h',
@@ -77,7 +84,6 @@ executable(
'commands.c', 'commands.h',
'csi.c', 'csi.h',
'fdm.c', 'fdm.h',
- 'font.c', 'font.h',
'grid.c', 'grid.h',
'input.c', 'input.h',
'log.c', 'log.h',
@@ -95,7 +101,7 @@ executable(
'wayland.c', 'wayland.h',
wl_proto_src + wl_proto_headers, version,
dependencies: [threads, math, freetype, fontconfig, pixman, wayland_client, wayland_cursor, xkb,
- tllist],
+ tllist, fcft],
install: true)
executable(
diff --git a/render.c b/render.c
index b90b27e8..438c105a 100644
--- a/render.c
+++ b/render.c
@@ -10,12 +10,13 @@
#include <wayland-cursor.h>
#include <xdg-shell.h>
+#include <fcft.h>
+
#define LOG_MODULE "render"
#define LOG_ENABLE_DBG 0
#include "log.h"
#include "shm.h"
#include "grid.h"
-#include "font.h"
#define min(x, y) ((x) < (y) ? (x) : (y))
#define max(x, y) ((x) > (y) ? (x) : (y))
diff --git a/subprojects/fcft b/subprojects/fcft
new file mode 160000
+Subproject 6377db4464f9a411c17b681f4a41c36950f1a23
diff --git a/terminal.h b/terminal.h
index bec33790..a75a5467 100644
--- a/terminal.h
+++ b/terminal.h
@@ -8,10 +8,11 @@
#include <threads.h>
#include <semaphore.h>
+#include <tllist.h>
+#include <fcft.h>
+
//#include "config.h"
#include "fdm.h"
-#include "font.h"
-#include "tllist.h"
#include "wayland.h"
#define likely(c) __builtin_expect(!!(c), 1)
diff --git a/wayland.h b/wayland.h
index fb681dd6..36c58b49 100644
--- a/wayland.h
+++ b/wayland.h
@@ -9,8 +9,9 @@
#include <primary-selection-unstable-v1.h>
#include <xkbcommon/xkbcommon.h>
+#include <tllist.h>
+
#include "fdm.h"
-#include "tllist.h"
struct monitor {
struct wayland *wayl;