From 665668e5a11d86448ed3cdcef7cffe14989f40f2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 11 Feb 2014 21:03:20 -0500 Subject: Add a convenient default font. * data/fonts/DejaVuSans.ttf: New file. * data/fonts/AUTHORS: New file. * data/Makefile.am: New file. * configure.ac (AC_CONFIG_FILES): Add 'data/Makefile'. * Makefile.am (SUBDIRS): Add 'data'. * 2d/font.scm (default-font): New variable. --- 2d/font.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '2d/font.scm') diff --git a/2d/font.scm b/2d/font.scm index 688f9e9..1e5f6ef 100644 --- a/2d/font.scm +++ b/2d/font.scm @@ -27,6 +27,7 @@ #:use-module (system foreign) #:use-module (2d wrappers ftgl) #:use-module (2d color) + #:use-module (2d config) #:use-module (2d vector2)) ;;; @@ -63,12 +64,16 @@ upper-left corner rather than the bottom-left." text (ftgl-render-mode all)))) +(define default-font + (load-font (string-append %pkgdatadir "/fonts/DejaVuSans.ttf") 12)) + (export make-font font? font-size load-font - draw-font) + draw-font + default-font) ;;; ;;; Textbox -- cgit v1.2.3