Index: trunk/src/gfx/texture_font.cc
===================================================================
--- trunk/src/gfx/texture_font.cc	(revision 399)
+++ trunk/src/gfx/texture_font.cc	(revision 403)
@@ -11,4 +11,10 @@
 
 using namespace nv;
+
+#define NV_CHECK_FREETYPE_ERROR( error, ... ) \
+if ( error != 0 ) { \
+	NV_LOG_CRITICAL( "freetype : ", __VA_ARGS__ ); \
+	NV_ABORT( "freetype : freetype library error!" ); \
+}
 
 texture_glyph::texture_glyph()
@@ -45,11 +51,11 @@
 	 
 	error = FT_Init_FreeType( (FT_Library*)(&m_rlibrary) );
-	if ( error ) NV_THROW( std::runtime_error, "FT_Error" );
+	NV_CHECK_FREETYPE_ERROR( error, "error on FT_Init_FreeType, code - ", error );
 
 	error = FT_New_Face( (FT_Library)(m_rlibrary), filename, 0, (FT_Face*)(&m_rface) );
-	if ( error ) NV_THROW( std::runtime_error, "FT_Error" );
+	NV_CHECK_FREETYPE_ERROR( error, "error on FT_New_Face, code - ", error );
 
 	error = FT_Set_Char_Size( (FT_Face)(m_rface), (int)(size*64), 0, 72*64, 72 ); 
-	if ( error ) NV_THROW( std::runtime_error, "FT_Error" );
+	NV_CHECK_FREETYPE_ERROR( error, "error on FT_Set_Char_Size, code - ", error );
 
     FT_Set_Transform( (FT_Face)(m_rface), &matrix, NULL );
@@ -123,9 +129,5 @@
 		FT_UInt glyph_index = FT_Get_Char_Index( face, c ); 
 		FT_Error error = FT_Load_Glyph( face, glyph_index, flags ); 
-		if ( error )
-		{
-			NV_LOG_ERROR( "FT_Error while loading glyphs, error: ", error, " code: ", c );
-			NV_THROW( std::runtime_error, "FT_Error while loading glyphs" );
-		}
+		NV_CHECK_FREETYPE_ERROR( error, "error on FT_Load_Glyph, gylph '", c ,"' code - ", error );
 
 		FT_GlyphSlot slot   = face->glyph;
@@ -141,6 +143,6 @@
 		if ( r.pos.x < 0 ) 
 		{
-			NV_LOG_ERROR( "Atlas full while loading glyphs, r.pos.x: ", r.pos.x, " code: ", c );
-			NV_THROW( std::runtime_error, "Atlas full while loading glyphs" );
+			NV_LOG_CRITICAL( "texture_font : atlas full while loading glyphs, gylph '", c, "' r.pos.x = ", r.pos.x );
+			NV_ABORT( "texture_font : atlas full while loading gylphs!" );
 		}
 		if (depth == 4)
