summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in1
-rw-r--r--navit/font/freetype/font_freetype.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 279053185..db65eedff 100644
--- a/configure.in
+++ b/configure.in
@@ -393,6 +393,7 @@ fi
AC_SUBST(FREETYPE2_CFLAGS)
AC_SUBST(FREETYPE2_LIBS)
AM_CONDITIONAL(FONT_FREETYPE, test "x${font_freetype}" = "xyes")
+AC_ARG_WITH(freetype-fonts, [ --with-freetype-fonts specify what fonts to use], AC_DEFINE_UNQUOTED(FREETYPE_FONTS,[${withval}],[Freetype fonts to use]))
AC_ARG_ENABLE(fontconfig, [ --disable-fontconfig don't add fontconfig support], fontconfig=$enableval;fontconfig_reason="configure parameter")
if test "x${fontconfig}" = "xyes"; then
diff --git a/navit/font/freetype/font_freetype.c b/navit/font/freetype/font_freetype.c
index 4b277a76b..6add9ad48 100644
--- a/navit/font/freetype/font_freetype.c
+++ b/navit/font/freetype/font_freetype.c
@@ -437,7 +437,15 @@ font_freetype_font_new(struct graphics_priv *gr,
}
g_free(family_sav);
#else
+#ifdef FREETYPE_FONTS
+ {
+ char *fonts[]={FREETYPE_FONTS};
+ name=g_strdup(fonts[flags ? 1:0]);
+ }
+#else
name=g_strdup_printf("%s/fonts/%s-%s.ttf",getenv("NAVIT_SHAREDIR"),"LiberationSans",flags ? "Bold":"Regular");
+#endif
+
#if USE_CACHING
idstr=g_strdup_printf("%s/%d", name, 0);
font->scaler.face_id=(FTC_FaceID)atom(idstr);