All of lore.kernel.org
 help / color / mirror / Atom feed
* [psplash][PATCH 1/3] Support --with-font configure option to use other font headers
@ 2019-12-17 10:22 Andrei Gherzan
  2019-12-17 10:22 ` [psplash][PATCH 2/3] Double buffering support Andrei Gherzan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrei Gherzan @ 2019-12-17 10:22 UTC (permalink / raw)
  To: yocto; +Cc: David Steinberg

From: David Steinberg <david@sonabuzz.com>

Signed-off-by: David Steinberg <david@sonabuzz.com>
---
 Makefile.am  | 4 ++--
 configure.ac | 6 ++++++
 psplash.c    | 6 +++---
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index a14152a..3721a6e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,11 @@
 bin_PROGRAMS=psplash psplash-write
 
-AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE
+AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font
 
 psplash_SOURCES = psplash.c psplash.h psplash-fb.c psplash-fb.h \
                   psplash-console.c psplash-console.h           \
 		  psplash-colors.h psplash-config.h		\
-		  psplash-poky-img.h psplash-bar-img.h radeon-font.h
+		  psplash-poky-img.h psplash-bar-img.h $(FONT_NAME)-font.h
 
 psplash_write_SOURCES = psplash-write.c psplash.h
 
diff --git a/configure.ac b/configure.ac
index 1c4d919..9e78ac0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,12 @@ fi
 
 AC_SUBST(GCC_FLAGS)
 
+AC_ARG_WITH([font],
+    AS_HELP_STRING([--with-font], [Set font to use (default is 'radeon')]),
+    [FONT_NAME=$withval],
+    [FONT_NAME=radeon])
+AC_SUBST([FONT_NAME])
+
 AC_OUTPUT([
 Makefile
 ])
diff --git a/psplash.c b/psplash.c
index 992e199..f6442f1 100644
--- a/psplash.c
+++ b/psplash.c
@@ -23,7 +23,7 @@
 #include "psplash-colors.h"
 #include "psplash-poky-img.h"
 #include "psplash-bar-img.h"
-#include "radeon-font.h"
+#include FONT_HEADER
 
 #define SPLIT_LINE_POS(fb)                                  \
 	(  (fb)->height                                     \
@@ -45,7 +45,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
 {
   int w, h;
 
-  psplash_fb_text_size (&w, &h, &radeon_font, msg);
+  psplash_fb_text_size (&w, &h, &FONT_DEF, msg);
 
   DBG("displaying '%s' %ix%i\n", msg, w, h);
 
@@ -62,7 +62,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg)
 			(fb->width-w)/2, 
 			SPLIT_LINE_POS(fb) - h,
 			PSPLASH_TEXT_COLOR,
-			&radeon_font,
+			&FONT_DEF,
 			msg);
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-15 18:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 10:22 [psplash][PATCH 1/3] Support --with-font configure option to use other font headers Andrei Gherzan
2019-12-17 10:22 ` [psplash][PATCH 2/3] Double buffering support Andrei Gherzan
2019-12-17 10:22 ` [psplash][PATCH 3/3] Add configure flags for fullscreen logo and no startup message Andrei Gherzan
2020-01-15 18:06 ` [psplash][PATCH 1/3] Support --with-font configure option to use other font headers Andrei Gherzan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.