summaryrefslogtreecommitdiff
path: root/src/FreeType
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-09-27 12:31:50 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-09-27 12:31:50 -0700
commit6628b4d82426cf9ac240da363cd8a8252e6f71ef (patch)
tree5aa48c3fa4e83bad9df0233570aa4fca278686b8 /src/FreeType
parentc482a2c104aa5cd1a265c2ca310a308dcc418fe7 (diff)
FreeType: Cleanup MUMBLE and fix printing of XLFD in debug spew.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'src/FreeType')
-rw-r--r--src/FreeType/ft.h6
-rw-r--r--src/FreeType/ftfuncs.c24
2 files changed, 10 insertions, 20 deletions
diff --git a/src/FreeType/ft.h b/src/FreeType/ft.h
index d5d789e..a5fba76 100644
--- a/src/FreeType/ft.h
+++ b/src/FreeType/ft.h
@@ -33,11 +33,9 @@ THE SOFTWARE.
#undef DEBUG_TRUETYPE
#ifdef DEBUG_TRUETYPE
-#define MUMBLE(s) (ErrorF((s)))
-#define MUMBLE1(s,x) (ErrorF((s),(x)))
+#define MUMBLE ErrorF
#else
-#define MUMBLE(s)
-#define MUMBLE1(s,x)
+#define MUMBLE(...)
#endif
#undef MAX
diff --git a/src/FreeType/ftfuncs.c b/src/FreeType/ftfuncs.c
index 47ebac7..6dc3f4e 100644
--- a/src/FreeType/ftfuncs.c
+++ b/src/FreeType/ftfuncs.c
@@ -188,7 +188,7 @@ FreeTypeOpenFace(FTFacePtr *facep, char *FTFileName, char *realFileName, int fac
otherFace = otherFace->next;
}
if(otherFace) {
- MUMBLE1("Returning cached face: %s\n", otherFace->filename);
+ MUMBLE("Returning cached face: %s\n", otherFace->filename);
*facep = otherFace;
return Successful;
}
@@ -253,7 +253,7 @@ FreeTypeFreeFace(FTFacePtr face)
else
ErrorF("FreeType: freeing unknown face\n");
}
- MUMBLE1("Closing face: %s\n", face->filename);
+ MUMBLE("Closing face: %s\n", face->filename);
FT_Done_Face(face->face);
free(face->filename);
free(face);
@@ -3645,7 +3645,7 @@ FreeTypeGetMetrics(FontPtr pFont, unsigned long count, unsigned char *chars,
struct TTCapInfo *ttcap;
xCharInfo **mp, *m;
- /* MUMBLE1("Get metrics for %ld characters\n", count);*/
+ /* MUMBLE("Get metrics for %ld characters\n", count);*/
tf = (FTFontPtr)pFont->fontPrivate;
ttcap = &tf->instance->ttcap;
@@ -3780,7 +3780,7 @@ FreeTypeSetUpFont(FontPathElementPtr fpe, FontPtr xf, FontInfoPtr info,
if ((xrc = CheckFSFormat(format, fmask, &bmfmt->bit, &bmfmt->byte,
&bmfmt->scan, &bmfmt->glyph,
&image)) != Successful) {
- MUMBLE1("Aborting after checking FS format: %d\n", xrc);
+ MUMBLE("Aborting after checking FS format: %d\n", xrc);
return xrc;
}
@@ -3829,11 +3829,7 @@ FreeTypeOpenScalable(FontPathElementPtr fpe, FontPtr *ppFont, int flags,
FontPtr xf;
FontBitmapFormatRec bmfmt;
- MUMBLE1("Open Scalable %s, XLFD=",fileName);
-#ifdef DEBUG_TRUETYPE
- fwrite(entry->name.name, entry->name.length, 1, stdout);
-#endif
- MUMBLE("\n");
+ MUMBLE("Open Scalable %s, XLFD=%s\n",fileName, entry->name.length ? entry->name.name : "");
xf = CreateFontRec();
if (xf == NULL)
@@ -3846,7 +3842,7 @@ FreeTypeOpenScalable(FontPathElementPtr fpe, FontPtr *ppFont, int flags,
}
xrc = FreeTypeLoadXFont(fileName, vals, xf, &xf->info, &bmfmt, entry);
if(xrc != Successful) {
- MUMBLE1("Error during load: %d\n",xrc);
+ MUMBLE("Error during load: %d\n",xrc);
DestroyFontRec(xf);
return xrc;
}
@@ -3866,11 +3862,7 @@ FreeTypeGetInfoScalable(FontPathElementPtr fpe, FontInfoPtr info,
int xrc;
FontBitmapFormatRec bmfmt;
- MUMBLE("Get info, XLFD= ");
-#ifdef DEBUG_TRUETYPE
- fwrite(entry->name.name, entry->name.length, 1, stdout);
-#endif
- MUMBLE("\n");
+ MUMBLE("Get info, XLFD=%s\n", entry->name.length ? entry->name.name : "");
xrc = FreeTypeSetUpFont(fpe, 0, info, 0, 0, &bmfmt);
if(xrc != Successful) {
@@ -3881,7 +3873,7 @@ FreeTypeGetInfoScalable(FontPathElementPtr fpe, FontInfoPtr info,
xrc = FreeTypeLoadXFont(fileName, vals, 0, info, &bmfmt, entry);
if(xrc != Successful) {
- MUMBLE1("Error during load: %d\n", xrc);
+ MUMBLE("Error during load: %d\n", xrc);
return xrc;
}