diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:34:19 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-11-22 22:34:19 +0000 |
commit | 2a6aa9b917249f44e4aa27d88e255f61eb171d6a (patch) | |
tree | 0ad46b248e42f96e93b54874aa3b073ad1273aa1 /navit/font/freetype | |
parent | 05edfdebd6b83267121b11538abafe39bff266e7 (diff) | |
download | navit-2a6aa9b917249f44e4aa27d88e255f61eb171d6a.tar.gz |
Refactor:core:Introduce enum for debug levels, and use it everywhere.|First part of #1269.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5960 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/font/freetype')
-rw-r--r-- | navit/font/freetype/font_freetype.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/navit/font/freetype/font_freetype.c b/navit/font/freetype/font_freetype.c index e4453b592..bf8682e66 100644 --- a/navit/font/freetype/font_freetype.c +++ b/navit/font/freetype/font_freetype.c @@ -351,21 +351,21 @@ static FT_Error face_requester( FTC_FaceID face_id, FT_Library library, FT_Point if (! face_id) return FT_Err_Invalid_Handle; fontfile=g_strdup((char *)face_id); - dbg(1,"fontfile=%s\n", fontfile); + dbg(lvl_warning,"fontfile=%s\n", fontfile); fontindex=strrchr(fontfile,'/'); if (! fontindex) { g_free(fontfile); return FT_Err_Invalid_Handle; } *fontindex++='\0'; - dbg(1,"new face %s %d\n", fontfile, atoi(fontindex)); + dbg(lvl_warning,"new face %s %d\n", fontfile, atoi(fontindex)); ret = FT_New_Face( library, fontfile, atoi(fontindex), aface ); if(ret) { - dbg(0,"Error while creating freetype face: %d\n", ret); + dbg(lvl_error,"Error while creating freetype face: %d\n", ret); return ret; } if((ret = FT_Select_Charmap(*aface, FT_ENCODING_UNICODE))) { - dbg(0,"Error while creating freetype face: %d\n", ret); + dbg(lvl_error,"Error while creating freetype face: %d\n", ret); } return 0; } @@ -412,7 +412,7 @@ font_freetype_font_new(struct graphics_priv *gr, } font->size=size; #ifdef HAVE_FONTCONFIG - dbg(2, " about to search for fonts, preferred = %s\n", fontfamily); + dbg(lvl_info, " about to search for fonts, preferred = %s\n", fontfamily); family = g_malloc(sizeof(fontfamilies) + sizeof(fontfamily)); if (fontfamily) { memcpy(family, &fontfamily, sizeof(fontfamily)); @@ -426,7 +426,7 @@ font_freetype_font_new(struct graphics_priv *gr, while (*family && !found) { - dbg(2, "Looking for font family %s. exact=%d\n", + dbg(lvl_info, "Looking for font family %s. exact=%d\n", *family, exact); FcPattern *required = FcPatternBuild(NULL, FC_FAMILY, FcTypeString, @@ -456,7 +456,7 @@ font_freetype_font_new(struct graphics_priv *gr, if ((r1 == FcResultMatch) && (r2 == FcResultMatch) && (FcValueEqual(v1, v2) || !exact)) { - dbg(2, + dbg(lvl_info, "About to load font from file %s index %d\n", fontfile, fontindex); #if USE_CACHING @@ -528,7 +528,7 @@ font_freetype_font_new(struct graphics_priv *gr, g_free(name); #endif /* HAVE_FONTCONFIG */ if (!found) { - dbg(0,"Failed to load font, no labelling\n"); + dbg(lvl_error,"Failed to load font, no labelling\n"); g_free(font); return NULL; } |