Index: /trunk/src/Makefile.am
===================================================================
--- /trunk/src/Makefile.am	(revision 5343)
+++ /trunk/src/Makefile.am	(revision 5344)
@@ -77,4 +77,6 @@
                   lib/graphics/light.cc \
                   lib/graphics/shader.cc \
+                  lib/graphics/text_engine/text.cc \
+                  lib/graphics/text_engine/font.cc \
                   lib/graphics/text_engine/text_engine.cc \
                   lib/graphics/render2D/element_2d.cc \
@@ -150,4 +152,6 @@
                  lib/graphics/light.h \
                  lib/graphics/shader.h \
+                 lib/graphics/text_engine/text.h \
+                 lib/graphics/text_engine/font.h \
                  lib/graphics/text_engine/text_engine.h \
                  lib/lang/base_object.h \
Index: /trunk/src/Makefile.in
===================================================================
--- /trunk/src/Makefile.in	(revision 5343)
+++ /trunk/src/Makefile.in	(revision 5344)
@@ -76,5 +76,6 @@
 	orxonox-p_node.$(OBJEXT) orxonox-null_parent.$(OBJEXT) \
 	orxonox-graphics_engine.$(OBJEXT) orxonox-light.$(OBJEXT) \
-	orxonox-shader.$(OBJEXT) orxonox-text_engine.$(OBJEXT) \
+	orxonox-shader.$(OBJEXT) orxonox-text.$(OBJEXT) \
+	orxonox-font.$(OBJEXT) orxonox-text_engine.$(OBJEXT) \
 	orxonox-element_2d.$(OBJEXT) orxonox-render_2d.$(OBJEXT) \
 	orxonox-base_object.$(OBJEXT) orxonox-class_list.$(OBJEXT) \
@@ -104,4 +105,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-factory.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-fast_factory.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox-font.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-game_loader.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-garbage_collector.Po \
@@ -132,4 +134,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-test_entity.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-test_gun.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/orxonox-text.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-text_engine.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/orxonox-track_manager.Po \
@@ -337,4 +340,6 @@
                   lib/graphics/light.cc \
                   lib/graphics/shader.cc \
+                  lib/graphics/text_engine/text.cc \
+                  lib/graphics/text_engine/font.cc \
                   lib/graphics/text_engine/text_engine.cc \
                   lib/graphics/render2D/element_2d.cc \
@@ -410,4 +415,6 @@
                  lib/graphics/light.h \
                  lib/graphics/shader.h \
+                 lib/graphics/text_engine/text.h \
+                 lib/graphics/text_engine/font.h \
                  lib/graphics/text_engine/text_engine.h \
                  lib/lang/base_object.h \
@@ -518,4 +525,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-factory.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-fast_factory.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-font.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-game_loader.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-garbage_collector.Po@am__quote@
@@ -546,4 +554,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-test_entity.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-test_gun.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-text.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-text_engine.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox-track_manager.Po@am__quote@
@@ -1244,4 +1253,36 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-shader.obj `if test -f 'lib/graphics/shader.cc'; then $(CYGPATH_W) 'lib/graphics/shader.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/shader.cc'; fi`
+
+orxonox-text.o: lib/graphics/text_engine/text.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-text.o -MD -MP -MF "$(DEPDIR)/orxonox-text.Tpo" -c -o orxonox-text.o `test -f 'lib/graphics/text_engine/text.cc' || echo '$(srcdir)/'`lib/graphics/text_engine/text.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-text.Tpo" "$(DEPDIR)/orxonox-text.Po"; else rm -f "$(DEPDIR)/orxonox-text.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/text_engine/text.cc' object='orxonox-text.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/orxonox-text.Po' tmpdepfile='$(DEPDIR)/orxonox-text.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-text.o `test -f 'lib/graphics/text_engine/text.cc' || echo '$(srcdir)/'`lib/graphics/text_engine/text.cc
+
+orxonox-text.obj: lib/graphics/text_engine/text.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-text.obj -MD -MP -MF "$(DEPDIR)/orxonox-text.Tpo" -c -o orxonox-text.obj `if test -f 'lib/graphics/text_engine/text.cc'; then $(CYGPATH_W) 'lib/graphics/text_engine/text.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/text_engine/text.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-text.Tpo" "$(DEPDIR)/orxonox-text.Po"; else rm -f "$(DEPDIR)/orxonox-text.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/text_engine/text.cc' object='orxonox-text.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/orxonox-text.Po' tmpdepfile='$(DEPDIR)/orxonox-text.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-text.obj `if test -f 'lib/graphics/text_engine/text.cc'; then $(CYGPATH_W) 'lib/graphics/text_engine/text.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/text_engine/text.cc'; fi`
+
+orxonox-font.o: lib/graphics/text_engine/font.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-font.o -MD -MP -MF "$(DEPDIR)/orxonox-font.Tpo" -c -o orxonox-font.o `test -f 'lib/graphics/text_engine/font.cc' || echo '$(srcdir)/'`lib/graphics/text_engine/font.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-font.Tpo" "$(DEPDIR)/orxonox-font.Po"; else rm -f "$(DEPDIR)/orxonox-font.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/text_engine/font.cc' object='orxonox-font.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/orxonox-font.Po' tmpdepfile='$(DEPDIR)/orxonox-font.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-font.o `test -f 'lib/graphics/text_engine/font.cc' || echo '$(srcdir)/'`lib/graphics/text_engine/font.cc
+
+orxonox-font.obj: lib/graphics/text_engine/font.cc
+@am__fastdepCXX_TRUE@	if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT orxonox-font.obj -MD -MP -MF "$(DEPDIR)/orxonox-font.Tpo" -c -o orxonox-font.obj `if test -f 'lib/graphics/text_engine/font.cc'; then $(CYGPATH_W) 'lib/graphics/text_engine/font.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/text_engine/font.cc'; fi`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/orxonox-font.Tpo" "$(DEPDIR)/orxonox-font.Po"; else rm -f "$(DEPDIR)/orxonox-font.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='lib/graphics/text_engine/font.cc' object='orxonox-font.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/orxonox-font.Po' tmpdepfile='$(DEPDIR)/orxonox-font.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(orxonox_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o orxonox-font.obj `if test -f 'lib/graphics/text_engine/font.cc'; then $(CYGPATH_W) 'lib/graphics/text_engine/font.cc'; else $(CYGPATH_W) '$(srcdir)/lib/graphics/text_engine/font.cc'; fi`
 
 orxonox-text_engine.o: lib/graphics/text_engine/text_engine.cc
Index: /trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.cc	(revision 5343)
+++ /trunk/src/lib/graphics/graphics_engine.cc	(revision 5344)
@@ -27,5 +27,5 @@
 #include "ini_parser.h"
 #include "substring.h"
-
+#include "text.h"
 
 using namespace std;
@@ -564,5 +564,5 @@
 if (this->geTextCFPS == NULL)
 {
-  this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_RENDER_DYNAMIC);
+  this->geTextCFPS = new Text("fonts/arial_black.ttf", 15, TEXT_RENDER_DYNAMIC);
   this->geTextCFPS->setName("curFPS");
   this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
@@ -571,5 +571,5 @@
 if (this->geTextMaxFPS == NULL)
 {
-      this->geTextMaxFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_RENDER_DYNAMIC);
+      this->geTextMaxFPS = new Text("fonts/arial_black.ttf", 15, TEXT_RENDER_DYNAMIC);
       this->geTextMaxFPS->setName("MaxFPS");
       this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
@@ -578,5 +578,5 @@
 if (this->geTextMinFPS == NULL)
 {
-      this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_RENDER_DYNAMIC);
+      this->geTextMinFPS = new Text("fonts/arial_black.ttf", 15, TEXT_RENDER_DYNAMIC);
       this->geTextMinFPS->setName("MinFPS");
       this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
Index: /trunk/src/lib/graphics/text_engine/font.h
===================================================================
--- /trunk/src/lib/graphics/text_engine/font.h	(revision 5343)
+++ /trunk/src/lib/graphics/text_engine/font.h	(revision 5344)
@@ -2,4 +2,8 @@
  * @file font.h
  * brief Definition of the FONT-loading class
+ *
+ * !! IMPORTANT !! When using ttf fonts clear the license issues prior to
+ * adding them to orxonox. This is really important, because we do not want
+ * to offend anyone.
  */
 
Index: /trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.cc	(revision 5343)
+++ /trunk/src/lib/graphics/text_engine/text.cc	(revision 5344)
@@ -38,20 +38,4 @@
   if (fontFile != NULL)
     this->setFont(fontFile, fontSize);
-  this->setType(type);
-}
-
-/**
- *  creates a new Text Element
- * @param font the Font to render this text in
- * @param type The renderType to display this font in
- *
- * this constructor is private, because the user should initialize
- * a text with the TextEngine.
- */
-Text::Text(Font* font, TEXT_RENDER_TYPE type)
-{
-  this->init();
-
-  this->font = font;
   this->setType(type);
 }
@@ -89,15 +73,4 @@
 
 /**
- * sets the Font of this Text to font
- * @param font the Font (normaly from the ResourceManager) to allocate to this Text
- */
-void Text::setFont(Font* font)
-{
-  if (this->font != NULL)
-    ResourceManager::getInstance()->unload(this->font);
-  this->font = font;
-}
-
-/**
  * sets the Font of this Text to font from fontFile
  * @param fontFile the File to load the Font from.
@@ -111,11 +84,18 @@
 
   tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, &fontSize);
-  if (tmpFont == NULL)
+  if (tmpFont != NULL)
+  {
+    if (this->font != NULL)
+      ResourceManager::getInstance()->unload(this->font);
+    this->font = tmpFont;
+  }
+
+  else
   {
     PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
-    this->setFont(NULL);
-  }
-  else
-    this->setFont(tmpFont);
+    if (this->font != NULL)
+      ResourceManager::getInstance()->unload(this->font);
+    this->font = NULL;
+  }
 }
 
Index: /trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.h	(revision 5343)
+++ /trunk/src/lib/graphics/text_engine/text.h	(revision 5344)
@@ -24,5 +24,4 @@
 // FORWARD DECLARATION
 class Font;
-
 
 /**
@@ -57,5 +56,4 @@
 class Text : public Element2D
 {
-  friend class TextEngine;
   public:
     Text(const char* fontFile, unsigned int fontSize = TEXT_DEFAULT_SIZE, TEXT_RENDER_TYPE type = TEXT_RENDER_DYNAMIC);
@@ -86,7 +84,4 @@
 
   private:
-    Text(Font* font = NULL, TEXT_RENDER_TYPE type = TEXT_RENDER_DYNAMIC);
-    void setFont(Font* font);
-
 
   private:
Index: /trunk/src/lib/graphics/text_engine/text_engine.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/text_engine.cc	(revision 5343)
+++ /trunk/src/lib/graphics/text_engine/text_engine.cc	(revision 5344)
@@ -23,4 +23,6 @@
 
 #include "text_engine.h"
+#include "text.h"
+#include "font.h"
 
 using namespace std;
@@ -34,6 +36,4 @@
 #include "class_list.h"
 
-#include "p_node.h"
-#include "vector.h"
 #include "debug.h"
 #include "list.h"
@@ -126,25 +126,4 @@
 
 /**
- *  creates a new Text with a certain font.
- * @see Font::Font
- * @see Text::Text
-*/
-Text* TextEngine::createText(const char* fontFile, unsigned int fontSize, int textType)
-{
-  Font* tmpFont;
-  Text* newText;
-  Vector tmpVec;
-
-  tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, &fontSize);
-  if (!tmpFont)
-    {
-      PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
-      return NULL;
-    }
-  else
-    return new Text(tmpFont, TEXT_RENDER_DYNAMIC);
-}
-
-/**
  *  outputs some nice Debug information
 
Index: /trunk/src/lib/graphics/text_engine/text_engine.h
===================================================================
--- /trunk/src/lib/graphics/text_engine/text_engine.h	(revision 5343)
+++ /trunk/src/lib/graphics/text_engine/text_engine.h	(revision 5344)
@@ -18,6 +18,4 @@
 
 #include "base_object.h"
-#include "font.h"
-#include "text.h"
 
 #include "vector.h"
@@ -26,4 +24,5 @@
 class PNode;
 class Font;
+class Text;
 
 ///////////////////
@@ -37,8 +36,4 @@
   /** @returns a Pointer to the only object of this Class */
   inline static TextEngine* getInstance() { if (!singletonRef) singletonRef = new TextEngine();  return singletonRef; };
-
-  Text* createText(const char* fontFile,
-                   unsigned int fontSize = TEXT_DEFAULT_SIZE,
-                   int textType = TEXT_RENDER_DYNAMIC);
 
   void debug() const;
Index: /trunk/src/lib/shell/shell.cc
===================================================================
--- /trunk/src/lib/shell/shell.cc	(revision 5343)
+++ /trunk/src/lib/shell/shell.cc	(revision 5344)
@@ -22,5 +22,5 @@
 
 
-#include "text_engine.h"
+#include "text.h"
 #include "list.h"
 #include "graphics_engine.h"
@@ -225,5 +225,5 @@
   for (unsigned int i = 0; i < bufferDisplaySize; i++)
   {
-    bufferText[i] = TextEngine::getInstance()->createText(this->fontFile, this->textSize, TEXT_RENDER_DYNAMIC);
+    bufferText[i] = new Text(this->fontFile, this->textSize, TEXT_RENDER_DYNAMIC);
     bufferText[i]->setColor(1, 0, 0);
     bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
Index: /trunk/src/lib/shell/shell_input.h
===================================================================
--- /trunk/src/lib/shell/shell_input.h	(revision 5343)
+++ /trunk/src/lib/shell/shell_input.h	(revision 5344)
@@ -10,5 +10,5 @@
 #define _SHELL_INPUT_H
 
-#include "text_engine.h"
+#include "text.h"
 #include "event_listener.h"
 
Index: /trunk/src/util/resource_manager.cc
===================================================================
--- /trunk/src/util/resource_manager.cc	(revision 5343)
+++ /trunk/src/util/resource_manager.cc	(revision 5344)
@@ -30,5 +30,6 @@
 #endif /* NO_TEXTURES */
 #ifndef NO_TEXT
-#include "text_engine.h"
+#include "font.h"
+#include "text.h" //!< @todo this should not be included here. -> make FONT independant of SIZE...
 #endif /* NO_TEXT */
 #ifndef NO_AUDIO
@@ -359,5 +360,5 @@
               tmpResource->ttfSize = *(unsigned int*)param1;
             else
-              tmpResource->ttfSize = FONT_DEFAULT_SIZE;
+              tmpResource->ttfSize = TEXT_DEFAULT_SIZE;
 
           if(isFile(fullName))
@@ -613,5 +614,5 @@
               if (param1 == NULL)
                 {
-                  if (enumRes->ttfSize == FONT_DEFAULT_SIZE)
+                  if (enumRes->ttfSize == TEXT_DEFAULT_SIZE)
                     match = true;
                 }
Index: /trunk/src/util/track/track_manager.cc
===================================================================
--- /trunk/src/util/track/track_manager.cc	(revision 5343)
+++ /trunk/src/util/track/track_manager.cc	(revision 5344)
@@ -24,5 +24,5 @@
 #include "stdincl.h"
 #include "list.h"
-#include "text_engine.h"
+#include "text.h"
 #include "t_animation.h"
 
@@ -380,5 +380,5 @@
   this->setBindSlave(this->trackNode);
   // initializing the Text
-  this->trackText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_RENDER_DYNAMIC);
+  this->trackText = new Text("fonts/earth.ttf", 30, TEXT_RENDER_DYNAMIC);
   this->trackText->setAlignment(E2D_ALIGN_SCREEN_CENTER);
   // initializing the Animation for the Text.
