Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4533)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4536)
@@ -302,4 +302,5 @@
       if( unlikely(this->currentFPS < this->minFPS)) this->minFPS = this->currentFPS;
       
+#ifndef NO_TEXT
       char tmpChar1[20];
       sprintf(tmpChar1, "Current:  %4.0f", this->currentFPS);
@@ -311,4 +312,5 @@
       sprintf(tmpChar3, "Min:    %4.0f", this->minFPS);
       this->geTextMinFPS->setText(tmpChar3);
+#endif /* NO_TEXT */
     }
 }
@@ -324,4 +326,5 @@
   if( display)
     {
+#ifndef NO_TEXT
       this->geTextCFPS = TextEngine::getInstance()->createText("fonts/druid.ttf", 35, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
@@ -333,4 +336,5 @@
       this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
       this->geTextMinFPS->setPosition(5, 560);	
+#endif /* NO_TEXT */
     }
   this->bDisplayFPS = display;
Index: orxonox/trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.h	(revision 4533)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.h	(revision 4536)
@@ -76,8 +76,9 @@
   float          minFPS;          //!< minimal frame rate we ever got since start
 
+#ifndef NO_TEXT
   Text*          geTextCFPS;      //!< Text for the current FPS
   Text*          geTextMaxFPS;    //!< Text for the max FPS
   Text*          geTextMinFPS;    //!< Text for the min FPS
-
+#endif /* NO_TEXT */
 };
 
Index: orxonox/trunk/src/lib/graphics/text_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4533)
+++ orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4536)
@@ -91,7 +91,9 @@
 void Text::setType(int type)
 {
-  this->type = type;
-}
-
+  if (this->font->font)
+    this->type = type;
+  else
+    this->type = TEXT_DYNAMIC;
+}
 
 /**
@@ -163,4 +165,5 @@
 
    this has to be called every time by the user, to if changes were made.
+   this is only for TEXT_STATIC-mode
 */
 void Text::createTexture(void)
@@ -169,7 +172,8 @@
   if (this->texture)
     glDeleteTextures(1, &this->texture);
-  tmpSurf = TTF_RenderText_Blended(this->font->font,
-				   this->text,
-				   this->color);
+  if (likely(this->font != NULL))
+    tmpSurf = TTF_RenderText_Blended(this->font->font,
+				     this->text,
+				     this->color);
   if (tmpSurf)
     this->texture = loadTexture(tmpSurf, &this->texCoord);
@@ -424,5 +428,5 @@
 
   // erease this font out of the memory.
-  if (this->font)
+  if (likely(this->font != NULL))
     TTF_CloseFont(this->font);
 }
@@ -441,5 +445,5 @@
       
       this->font = TTF_OpenFont(this->fontFile, this->fontSize);
-      if(!this->font) 
+      if(!this->font)
 	{
 	  PRINTF(1)("TTF_OpenFont: %s\n", TTF_GetError());
@@ -447,5 +451,5 @@
 	}
       else
-	return true;
+	  return true;
     }
   else
@@ -473,11 +477,9 @@
       this->renderStyle |= TTF_STYLE_UNDERLINE;
 
-  if (this->font)
+  if (likely(this->font != NULL))
     TTF_SetFontStyle(this->font, this->renderStyle);
   else
     PRINTF(2)("Font was not initialized, please do so before setting the Font-Style.\n");
 }
-
-
 
 /**
@@ -508,5 +510,5 @@
 int Font::getMaxHeight(void)
 {
-  if (this->font)
+  if (likely (this->font != NULL))
     return TTF_FontHeight(this->font);
   else
@@ -521,5 +523,5 @@
 int Font::getMaxAscent(void)
 {
-  if (this->font)
+  if (likely(this->font != NULL))
     return TTF_FontAscent(this->font);
   else
@@ -534,5 +536,5 @@
 int Font::getMaxDescent(void)
 {
-  if (this->font)
+  if (likely(this->font != NULL))
     return TTF_FontDescent(this->font);
   else
@@ -553,8 +555,9 @@
   Glyph* rg = new Glyph;
   rg->character = character;
-  TTF_GlyphMetrics(this->font, rg->character,
-		   &rg->minX, &rg->maxX,
-		   &rg->minY, &rg->maxY,
-		   &rg->advance);
+  if (likely (this->font!= NULL))
+    TTF_GlyphMetrics(this->font, rg->character,
+		     &rg->minX, &rg->maxX,
+		     &rg->minY, &rg->maxY,
+		     &rg->advance);
   rg->height = rg->maxY - rg->minY;
   rg->width = rg->maxX - rg->minX;
@@ -605,5 +608,5 @@
 
   // all the interessting Glyphs
-  for (int i = 32; i <= 122; i++)
+  for (int i = 0; i <= 127; i++)
     {
       SDL_Surface* glyphSurf = NULL;
@@ -627,6 +630,7 @@
 	    }
 	  // reading in the new Glyph
-	  glyphSurf = TTF_RenderGlyph_Blended(this->font, i, this->fastColor);
-	  if( glyphSurf ) 
+	  if (likely(this->font != NULL))
+	    glyphSurf = TTF_RenderGlyph_Blended(this->font, i, this->fastColor);
+	  if( glyphSurf != NULL )
 	    {
 
@@ -671,4 +675,5 @@
 	}
     }
+  SDL_SaveBMP(tmpSurf, "text");
 
   GLuint texture;
@@ -723,5 +728,5 @@
 
    This function searches for a 2^n sizes texture-size, this is for 
-   openGL-version < 1.2 compatibility. and because it is realy easy like this.
+   openGL-version < 1.2 compatibility ( and because it is realy easy like this :))
 */
 int Font::findOptimalFastTextureSize(void)
@@ -764,5 +769,4 @@
     }
   return size;
-  
 }
 
@@ -773,8 +777,8 @@
 void Font::debug(void)
 {
-
   // print the loaded font's style
   int style;
-  style = TTF_GetFontStyle(this->font);
+  if (likely(this->font != NULL))
+    style = TTF_GetFontStyle(this->font);
   PRINTF(0)("The font style is:");
   if(style==TTF_STYLE_NORMAL)
@@ -789,6 +793,4 @@
   }
   PRINTF(0)("\n");
-
-
 }
 
@@ -824,5 +826,4 @@
 
   TextEngine::singletonRef = NULL;
-
 }
 
Index: orxonox/trunk/src/lib/graphics/text_engine.h
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4533)
+++ orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4536)
@@ -30,5 +30,8 @@
 
 //! An enumerator for the text alignment.
-enum TEXT_ALIGNMENT {TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT, TEXT_ALIGN_CENTER, TEXT_ALIGN_SCREEN_CENTER};
+enum TEXT_ALIGNMENT { TEXT_ALIGN_LEFT,
+		      TEXT_ALIGN_RIGHT,
+		      TEXT_ALIGN_CENTER,
+		      TEXT_ALIGN_SCREEN_CENTER };
 
 /* some default values */
@@ -85,6 +88,6 @@
   
   // OpenGL-specific
-  //  TexCoord texCoord;         //!< A Texture Coordinate for this glyph.
-  GLuint displayList;         //!< DiplayList to render this Glyph.
+  //  TexCoord texCoord;      //!< A Texture Coordinate for this glyph.
+  GLuint   displayList;       //!< DiplayList to render this Glyph.
 };
 
