Index: trunk/src/lib/graphics/text_engine/font.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/font.cc	(revision 5767)
+++ trunk/src/lib/graphics/text_engine/font.cc	(revision 5768)
@@ -132,5 +132,4 @@
   this->fontTTF = NULL;
   this->glyphArray = NULL;
-  this->fastTextureID = 0;
 }
 
@@ -149,10 +148,5 @@
     this->fontTTF = NULL;
   }
-  if (this->fastTextureID != 0)
-  {
-    if(glIsTexture(this->fastTextureID))
-      glDeleteTextures(1, &this->fastTextureID);
-    this->fastTextureID = 0;
-  }
+
 
   this->setName(fontFile);
@@ -161,9 +155,6 @@
   if(this->fontTTF != NULL)
   {
-    this->fastTextureID = this->createFastTexture();
-    if (this->fastTextureID != 0)
-      return true;
-    else
-      return false;
+    this->createFastTexture();
+    return (this->getTexture() != 0);
   }
   else
@@ -190,12 +181,6 @@
     this->fontTTF = NULL;
   }
-  if (this->fastTextureID != 0)
-  {
-    if(glIsTexture(this->fastTextureID))
-      glDeleteTextures(1, &this->fastTextureID);
-    this->fastTextureID = 0;
-  }
-
-  this->fastTextureID = Text::loadTexture(surface, NULL);
+  if (this->prepareSurface(surface))
+    this->loadTexToGL( );
 
   // initializing the Glyphs.
@@ -251,4 +236,9 @@
 Font* Font::defaultFont = NULL;
 
+/**
+ * creates and exports an Image, that has all the characters
+ * stored in a Array (as an image)
+ * @param fileName the File to write the image into.
+ */
 void Font::createAsciiImage(const char* fileName)
 {
@@ -400,5 +390,5 @@
  * creates a Fast-Texture of this Font
  */
-GLuint Font::createFastTexture()
+bool Font::createFastTexture()
 {
   /* interesting GLYPHS:
@@ -500,19 +490,6 @@
   //   SDL_SaveBMP(tmpSurf, outName);
 
-  GLuint texture;
-  glGenTextures(1, &texture);
-  glBindTexture(GL_TEXTURE_2D, texture);
-  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  glTexImage2D(GL_TEXTURE_2D,
-               0,
-               GL_RGBA,
-               tmpSurf->w, tmpSurf->h,
-               0,
-               GL_RGBA,
-               GL_UNSIGNED_BYTE,
-               tmpSurf->pixels);
-  SDL_FreeSurface(tmpSurf);
-  return texture;
+  if (this->setSurface(tmpSurf))
+    loadTexToGL();
 }
 
Index: trunk/src/lib/graphics/text_engine/font.h
===================================================================
--- trunk/src/lib/graphics/text_engine/font.h	(revision 5767)
+++ trunk/src/lib/graphics/text_engine/font.h	(revision 5768)
@@ -11,5 +11,5 @@
 #define _FONT_H
 
-#include "base_object.h"
+#include "texture.h"
 
 #include "glincl.h"
@@ -52,5 +52,5 @@
 
 //! A class to handle a Font of a certain ttf-File/image-file, Size.
-class Font : public BaseObject
+class Font : public Texture
 {
   public:
@@ -63,5 +63,5 @@
     void init();
 
-  // font
+  //  font
     bool loadFontFromTTF(const char* fontFile);
     bool loadFontFromSDL_Surface(SDL_Surface* surface);
@@ -71,15 +71,14 @@
     /** @returns a Pointer to the Array of Glyphs */
     inline Glyph** getGlyphArray() const { return this->glyphArray; };
-    /** @returns the texture to the fast-texture */
-    inline GLuint getFastTextureID() const { return this->fastTextureID; };
+    /** @returns the a pointer to the TTF */
+    inline TTF_Font* getTTF() const { return this->fontTTF; };
+
+
     /** @returns the default Font */
     inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
-    /** @returns the a pointer to the TTF */
-    inline TTF_Font* getTTF() const { return this->fontTTF; };
 
     void createAsciiImage(const char* fileName);
     static void initDefaultFont();
     static void removeDefaultFont();
-
 
   private:
@@ -89,5 +88,5 @@
     Glyph* getGlyphMetrics(Uint16 character);
 
-    GLuint createFastTexture();
+    bool createFastTexture();
 
     void initGlyphs(Uint16 from, Uint16 count);
@@ -104,5 +103,4 @@
 
     Glyph**       glyphArray;          //!< An Array of all the Glyphs stored in the Array of Glyphs.
-    GLuint        fastTextureID;       //!< The fast textureID.
 };
 
Index: trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/text.cc	(revision 5767)
+++ trunk/src/lib/graphics/text_engine/text.cc	(revision 5768)
@@ -38,5 +38,5 @@
   if (fontFile != NULL)
     this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
-  this->setSizeY2D(this->size = textSize);
+  this->setSizeY2D(textSize);
 }
 
@@ -69,6 +69,5 @@
   this->blending = TEXT_DEFAULT_BLENDING;
   this->color = TEXT_DEFAULT_COLOR;
-  this->size = TEXT_DEFAULT_SIZE;
-
+  this->setSize(TEXT_DEFAULT_SIZE);
   this->setText(NULL);
 }
@@ -182,5 +181,5 @@
   {
     glyphArray = this->font->getGlyphArray();
-    glBindTexture(GL_TEXTURE_2D, font->getFastTextureID());
+    glBindTexture(GL_TEXTURE_2D, font->getTexture());
   }
   else
@@ -189,5 +188,5 @@
       Font::initDefaultFont();
     glyphArray = Font::getDefaultFont()->getGlyphArray();
-    glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getFastTextureID());
+    glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getTexture());
   }
   const char* tmpText = this->externText;
@@ -210,15 +209,15 @@
 
         glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
-        glVertex2d(posX, this->size);
+        glVertex2d(posX, this->getSizeY2D());
 
         glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
-        glVertex2d(posX+tmpGlyph->width*this->size, this->size);
+        glVertex2d(posX+tmpGlyph->width*this->getSizeY2D(), this->getSizeY2D());
 
         glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
-        glVertex2d(posX+tmpGlyph->width*this->size, 0);
+        glVertex2d(posX+tmpGlyph->width*this->getSizeY2D(), 0);
 
         glEnd();
         glEndList();
-        posX += tmpGlyph->advance * this->size;
+        posX += tmpGlyph->advance * this->getSizeY2D();
       }
       ++tmpText;
Index: trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- trunk/src/lib/graphics/text_engine/text.h	(revision 5767)
+++ trunk/src/lib/graphics/text_engine/text.h	(revision 5768)
@@ -54,5 +54,5 @@
     void setColor(float r, float g, float b) { this->color = Vector(r, g, b); };
     /** sets the Size of the Font */
-    void setSize(float size) { this->setSizeY2D(this->size = size); };
+    void setSize(float size) { this->setSizeY2D(size); };
     /** @returns the Size of the Text */
 //    void getSize(float &x, float& y) const { return this->size; };
@@ -73,5 +73,4 @@
     Vector            color;          //!< The color of the font.
     float             blending;       //!< The blending intensity.
-    float             size;           //!< The size of the Font.
 };
 
