summaryrefslogtreecommitdiff
path: root/navit/font/freetype
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-01-13 14:46:28 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-01-13 14:46:28 +0000
commit1522064f3ccf8b77ba22082082a6d3755bd2bec7 (patch)
tree4740e33b68e35c8059c095fa9706f6ca11704924 /navit/font/freetype
parent0354f62cbea126820cc22d32b345fb69e4eb13e1 (diff)
downloadnavit-1522064f3ccf8b77ba22082082a6d3755bd2bec7.tar.gz
Fix:font_freetype:Made working without fontconfig again
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1934 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/font/freetype')
-rw-r--r--navit/font/freetype/font_freetype.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/navit/font/freetype/font_freetype.c b/navit/font/freetype/font_freetype.c
index 666db2008..2673e8a3f 100644
--- a/navit/font/freetype/font_freetype.c
+++ b/navit/font/freetype/font_freetype.c
@@ -433,8 +433,25 @@ font_freetype_font_new(struct graphics_priv *gr,
}
#else
name=g_strdup_printf("%s/fonts/%s-%s.ttf",getenv("NAVIT_SHAREDIR"),"LiberationSans",flags ? "Bold":"Regular");
+#ifdef USE_CACHING
+ idstr=g_strdup_printf("%s/%d", name, 0);
+ font->scaler.face_id=(FTC_FaceID)atom(idstr);
+ g_free(idstr);
+#ifdef HAVE_LOOKUP_SCALER
+ font->scaler.width=0;
+ font->scaler.height=size;
+ font->scaler.pixel=0;
+ font->scaler.x_res=300;
+ font->scaler.y_res=300;
+#else
+ font->scaler.width=size/15;
+ font->scaler.height=size/15;
+ font->scaler.flags=FT_LOAD_DEFAULT;
+#endif
+#else
if (!FT_New_Face(library, name, 0, &font->face))
found=1;
+#endif
g_free(name);
#endif
if (!found) {