Index: /branches/fontdata/src/lib/graphics/text_engine/font.h
===================================================================
--- /branches/fontdata/src/lib/graphics/text_engine/font.h	(revision 8759)
+++ /branches/fontdata/src/lib/graphics/text_engine/font.h	(revision 8760)
@@ -28,4 +28,5 @@
 
   Font& operator=(const Font& font);
+  /** @brief compare two fonts @param font the comparator, @returns true if they match */
   bool operator==(const Font& font) const { return this->data == font.data; };
 
@@ -45,8 +46,4 @@
   int getMaxAscent() const;
   int getMaxDescent() const;
-
-  /** @returns the default Font */
-  //inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
-
 
   void createAsciiImage(const std::string& fileName, unsigned int size) const;
Index: /branches/fontdata/src/lib/graphics/text_engine/text.cc
===================================================================
--- /branches/fontdata/src/lib/graphics/text_engine/text.cc	(revision 8759)
+++ /branches/fontdata/src/lib/graphics/text_engine/text.cc	(revision 8760)
@@ -28,5 +28,5 @@
  */
 Text::Text(const std::string& fontFile, unsigned int textSize)
-  : _font(fontFile, FONT_DEFAULT_RENDER_SIZE)
+    : _font(fontFile, FONT_DEFAULT_RENDER_SIZE)
 {
   this->setClassID(CL_TEXT, "Text");
@@ -35,5 +35,5 @@
   this->_size = textSize;
   this->setSizeY2D(textSize);
-  this->_color = TEXT_DEFAULT_COLOR;
+  this->setColor(TEXT_DEFAULT_COLOR);
 
   this->setAlignment(TEXT_DEFAULT_ALIGNMENT);
@@ -41,5 +41,5 @@
 
 Text::Text(const Text& text)
-  : _font()
+    : _font()
 {
   this->setClassID(CL_TEXT, "Text");
@@ -54,6 +54,6 @@
 Text::~Text()
 {
-/*  if (this->_font != NULL && this->_font != Font::getDefaultFont())
-    ResourceManager::getInstance()->unload(this->_font);*/
+  /*  if (this->_font != NULL && this->_font != Font::getDefaultFont())
+      ResourceManager::getInstance()->unload(this->_font);*/
 }
 
@@ -67,6 +67,5 @@
   return (this->_text == text._text &&
           this->_size == text._size &&
-          this->_font == text._font &&
-          this->_color == text._color);
+          this->_font == text._font );
 }
 
@@ -89,5 +88,4 @@
 {
   this->_size = text._size;
-  this->_color = text._color;
   this->setAlignment(text.getAlignment());
 
@@ -171,5 +169,5 @@
 {
   Font* newFont = NULL;
-//  Font* oldFont = this->_font;
+  //  Font* oldFont = this->_font;
 
   // load a new Font
@@ -179,18 +177,16 @@
     if (newFont == NULL)
     {
-//      newFont = &Font::();
+      //      newFont = &Font::();
       PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile.c_str());
     }
   }
-//  if (newFont == NULL)
-//    newFont = Font::getDefaultFont();
-  assert(newFont != NULL);
-
-  // unloading the Font if we alrady have one loaded.
-
-  this->_font = *newFont;
-//   if (oldFont != NULL && oldFont != Font::getDefaultFont())
-//     ResourceManager::getInstance()->unload(oldFont);
-
+
+  if (newFont == NULL)
+    this->_font = Font();
+  else
+    this->_font = *newFont;
+
+  printf("Font Texture is\n" );
+  _font.debug();
   this->setupTextWidth();
 }
@@ -223,8 +219,4 @@
     glTranslatef(-this->getSizeX2D()/2, 0, 0);
 
-  // drawing this Text.
-  // setting the Blending effects
-  glColor4fv(&this->_color[0]);
-
   this->font().select();
   glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
@@ -278,5 +270,5 @@
 {
   PRINT(0)("=== TEXT: %s (with Font:'%s')  displaying %s ===\n", this->getName(), this->_font.getName(), this->_text.c_str());
-  PRINT(0)("Color: r=%0.2f g=%0.2f b=%0.2f a=%0.2f\n", this->_color.r(), this->_color.g(), this->_color.b(), this->_color.a());
-}
-
+  //  PRINT(0)("Color: r=%0.2f g=%0.2f b=%0.2f a=%0.2f\n", this->_color.r(), this->_color.g(), this->_color.b(), this->_color.a());
+}
+
Index: /branches/fontdata/src/lib/graphics/text_engine/text.h
===================================================================
--- /branches/fontdata/src/lib/graphics/text_engine/text.h	(revision 8759)
+++ /branches/fontdata/src/lib/graphics/text_engine/text.h	(revision 8760)
@@ -45,9 +45,9 @@
     void setFont(const std::string& fontFile, unsigned int renderSize);
     /** @param blending the blending intensity to set (between 0.0 and 1.0) */
-    inline void setBlending(float blending) { this->_color.a() = blending; };
+    inline void setBlending(float blending) { this->_font.setTransparency(blending); };
     /** @param r red @param g green @param b blue @brief sets the Color of the Text to render (values in [0-1]) */
-    void setColor(float r, float g, float b) { this->_color = Color(r, g, b, this->_color.a()); };
-    void setColor(float r, float g, float b, float a) { this->_color = Color(r, g, b, a); };
-    void setColor(const Color& color) { this->_color = color; };
+    void setColor(float r, float g, float b) { this->_font.setDiffuseColor(Color(r, g, b, this->blending())); };
+    void setColor(float r, float g, float b, float a) { this->_font.setDiffuseColor(Color(r, g, b, a)); };
+    void setColor(const Color& color) { this->_font.setDiffuseColor(color); };
     void setSize(float size);
 
@@ -60,7 +60,7 @@
     inline const Font& font() const { return this->_font; };
     /** @returns the Blending Value [0 invisible 1.0 full visible */
-    inline float blending() const { return this->_color.a(); };
+    inline float blending() const { return this->_font.diffuseColor().a(); };
     /** @returns: a Vector(r,g,b) @brief: retrieve a Vector holding the Color of the Text */
-    inline const Color& color() const { return this->_color; };
+    inline const Color& color() const { return this->_font.diffuseColor(); };
     /** @returns the Size of the Text */
     inline float size() const { return this->_size; };
@@ -79,5 +79,4 @@
 
     std::string       _text;           //!< The text to display
-    Color             _color;          //!< The color of the font.
     float             _size;           //!< The size of the Text.
 };
