summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2d/font.scm7
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac2
-rw-r--r--data/Makefile.am2
-rw-r--r--data/fonts/AUTHORS2
-rw-r--r--data/fonts/DejaVuSans.ttfbin0 -> 741536 bytes
6 files changed, 12 insertions, 2 deletions
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 <font>
make-font
font?
font-size
load-font
- draw-font)
+ draw-font
+ default-font)
;;;
;;; Textbox
diff --git a/Makefile.am b/Makefile.am
index c13bf1c..0bc83eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,5 +46,6 @@ WRAPPER_SOURCES = \
EXTRA_DIST += env.in
SUBDIRS = \
+ data \
doc \
examples
diff --git a/configure.ac b/configure.ac
index 061e208..93b3922 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ else
AC_MSG_ERROR([Guile 2.0 required.])
fi
-AC_CONFIG_FILES([Makefile doc/Makefile examples/Makefile])
+AC_CONFIG_FILES([Makefile doc/Makefile examples/Makefile data/Makefile])
AC_CONFIG_FILES([env], [chmod +x env])
PKG_CHECK_MODULES([SDL], [sdl <= 1.3 sdl >= 1.2])
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 0000000..552da87
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,2 @@
+fontsdir = $(pkgdatadir)/fonts
+fonts_DATA = fonts/DejaVuSans.ttf
diff --git a/data/fonts/AUTHORS b/data/fonts/AUTHORS
new file mode 100644
index 0000000..3367e7d
--- /dev/null
+++ b/data/fonts/AUTHORS
@@ -0,0 +1,2 @@
+DejaVu font by http://dejavu-fonts.org/wiki/Authors
+License details available at http://dejavu-fonts.org/wiki/License \ No newline at end of file
diff --git a/data/fonts/DejaVuSans.ttf b/data/fonts/DejaVuSans.ttf
new file mode 100644
index 0000000..9d40c32
--- /dev/null
+++ b/data/fonts/DejaVuSans.ttf
Binary files differ