diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-01-13 14:46:28 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-01-13 14:46:28 +0000 |
commit | 1522064f3ccf8b77ba22082082a6d3755bd2bec7 (patch) | |
tree | 4740e33b68e35c8059c095fa9706f6ca11704924 /navit/font | |
parent | 0354f62cbea126820cc22d32b345fb69e4eb13e1 (diff) | |
download | navit-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')
-rw-r--r-- | navit/font/freetype/font_freetype.c | 17 |
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) { |