From e3d7e6e1737a60ba0b500f885956f41b4eb08b98 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 8 Jun 2007 20:11:50 +0000 Subject: [PATCH] Added debug code path that prints out font details. --- src/osgPlugins/freetype/FreeTypeLibrary.cpp | 25 ++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/freetype/FreeTypeLibrary.cpp b/src/osgPlugins/freetype/FreeTypeLibrary.cpp index bd8ff5f89..45bb52563 100644 --- a/src/osgPlugins/freetype/FreeTypeLibrary.cpp +++ b/src/osgPlugins/freetype/FreeTypeLibrary.cpp @@ -14,6 +14,12 @@ #include "FreeTypeLibrary.h" #include #include + +//#define PRINT_OUT_FONT_DETAILS +#ifdef PRINT_OUT_FONT_DETAILS + #include +#endif + #include FT_TRUETYPE_IDS_H FreeTypeLibrary::FreeTypeLibrary() @@ -53,7 +59,7 @@ FreeTypeLibrary* FreeTypeLibrary::instance() osgText::Font* FreeTypeLibrary::getFont(const std::string& fontfile,unsigned int index) { - FT_Face face; /* handle to face object */ + FT_Face face; /* handle to face object */ FT_Error error = FT_New_Face( _ftlibrary, fontfile.c_str(), index, &face ); if (error == FT_Err_Unknown_File_Format) { @@ -68,6 +74,23 @@ osgText::Font* FreeTypeLibrary::getFont(const std::string& fontfile,unsigned int return 0; } +#ifdef PRINT_OUT_FONT_DETAILS + + osg::notify(osg::NOTICE)<<"Face"<