summaryrefslogtreecommitdiff
path: root/src/entry.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-23 15:16:36 +0100
committerPhil Jones <philj56@gmail.com>2022-06-23 15:16:36 +0100
commit0dad59e82d77186d81063b409a7ea2cef15b0f40 (patch)
treeee73ee4268d1a5f61ed0c048003a3deb7f4ff9d4 /src/entry.h
parent128fa39bb62d1a1c627812f15030bf3ffb82100d (diff)
Combine Harfbuzz & Pango backends.
Tofi now uses Harfbuzz if a file is passed to --font-name, and Pango otherwise.
Diffstat (limited to 'src/entry.h')
-rw-r--r--src/entry.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/entry.h b/src/entry.h
index f1187d3..1b8bfe4 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -1,11 +1,8 @@
#ifndef ENTRY_H
#define ENTRY_H
-#ifdef USE_PANGO
#include "entry_backend/pango.h"
-#else
#include "entry_backend/harfbuzz.h"
-#endif
#include <cairo/cairo.h>
#include <wchar.h>
@@ -21,7 +18,8 @@
struct entry {
struct image image;
- struct entry_backend backend;
+ struct entry_backend_harfbuzz harfbuzz;
+ struct entry_backend_pango pango;
struct {
cairo_surface_t *surface;
cairo_t *cr;
@@ -38,6 +36,7 @@ struct entry {
struct string_vec results;
struct string_vec commands;
struct history history;
+ bool use_pango;
/* Options */
bool horizontal;