diff --git a/external/etk b/external/etk index 7dca8979..8acac891 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 7dca8979c6548a6d0f355c2c33535c3a553ef8a0 +Subproject commit 8acac8918b8899a4ededb35e99469ac7227465fe diff --git a/sources/ewol/Dimension.cpp b/sources/ewol/Dimension.cpp index 28ea00c5..9ffcbd53 100644 --- a/sources/ewol/Dimension.cpp +++ b/sources/ewol/Dimension.cpp @@ -121,7 +121,7 @@ void ewol::Dimension::Set(etk::UString _config) } vec2 tmp = _config; Set(tmp, type); - EWOL_ERROR(" config dimention : \"" << _config << "\" ==> " << *this ); + EWOL_VERBOSE(" config dimention : \"" << _config << "\" ==> " << *this ); } ewol::Dimension::~Dimension(void) @@ -309,8 +309,8 @@ etk::CCout& ewol::operator <<(etk::CCout &os, const ewol::Dimension::distance_te return os; } -etk::CCout& ewol::operator <<(etk::CCout &os, const ewol::Dimension& obj) +etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::Dimension& _obj) { - os << obj.Get(obj.GetType()) << obj.GetType(); - return os; + _os << _obj.Get(_obj.GetType()) << _obj.GetType(); + return _os; } diff --git a/sources/ewol/compositing/Text.cpp b/sources/ewol/compositing/Text.cpp index 02bf0874..2731690f 100644 --- a/sources/ewol/compositing/Text.cpp +++ b/sources/ewol/compositing/Text.cpp @@ -215,9 +215,9 @@ void ewol::Text::Clear(void) void ewol::Text::Reset(void) { - m_position = vec3(0.0, 0.0, 0.0); - m_clippingPosStart = vec3(0.0, 0.0, 0.0); - m_clippingPosStop = vec3(0.0, 0.0, 0.0); + m_position = vec3(0,0,0); + m_clippingPosStart = vec3(0,0,0); + m_clippingPosStop = vec3(0,0,0); m_sizeDisplayStart = m_position; m_sizeDisplayStop = m_position; m_nbCharDisplayed = 0; @@ -470,102 +470,105 @@ void ewol::Text::ParseHtmlNode(void* element2) { // get the static real pointer TiXmlNode* element = static_cast(element2); - if (NULL != element) { - for (TiXmlNode * child = element->FirstChild(); NULL != child ; child = child->NextSibling() ) { - if (child->Type()==TiXmlNode::TINYXML_COMMENT) { - // nothing to do ... - } else if (child->Type()==TiXmlNode::TINYXML_TEXT) { - HtmlAddData(child->Value() ); - EWOL_VERBOSE("XML Add : " << child->Value()); - } else if( !strcmp(child->Value(), "br") - || !strcmp(child->Value(), "BR")) { - HtmlFlush(); - EWOL_VERBOSE("XML flush & newLine"); - ForceLineReturn(); - } else if (!strcmp(child->Value(), "font")) { - EWOL_VERBOSE("XML Font ..."); - TextDecoration tmpDeco = m_htmlDecoTmp; - const char *colorValue = child->ToElement()->Attribute("color"); - if (NULL != colorValue) { - draw::ParseColor(colorValue, m_htmlDecoTmp.m_colorFg); - } - colorValue = child->ToElement()->Attribute("colorBg"); - if (NULL != colorValue) { - draw::ParseColor(colorValue, m_htmlDecoTmp.m_colorBg); - } - ParseHtmlNode(child); - m_htmlDecoTmp = tmpDeco; - } else if( !strcmp(child->Value(), "b") - || !strcmp(child->Value(), "bold")) { - EWOL_VERBOSE("XML bold ..."); - TextDecoration tmpDeco = m_htmlDecoTmp; - if (m_htmlDecoTmp.m_mode == ewol::font::Regular) { - m_htmlDecoTmp.m_mode = ewol::font::Bold; - } else if (m_htmlDecoTmp.m_mode == ewol::font::Italic) { - m_htmlDecoTmp.m_mode = ewol::font::BoldItalic; - } - ParseHtmlNode(child); - m_htmlDecoTmp = tmpDeco; - } else if( !strcmp(child->Value(), "i") - || !strcmp(child->Value(), "italic")) { - EWOL_VERBOSE("XML italic ..."); - TextDecoration tmpDeco = m_htmlDecoTmp; - if (m_htmlDecoTmp.m_mode == ewol::font::Regular) { - m_htmlDecoTmp.m_mode = ewol::font::Italic; - } else if (m_htmlDecoTmp.m_mode == ewol::font::Bold) { - m_htmlDecoTmp.m_mode = ewol::font::BoldItalic; - } - ParseHtmlNode(child); - m_htmlDecoTmp = tmpDeco; - } else if( !strcmp(child->Value(), "u") - || !strcmp(child->Value(), "underline")) { - EWOL_VERBOSE("XML underline ..."); - ParseHtmlNode(child); - } else if( !strcmp(child->Value(), "p") - || !strcmp(child->Value(), "paragraph")) { - EWOL_VERBOSE("XML paragraph ..."); - HtmlFlush(); - m_alignement = ewol::Text::alignLeft; - ForceLineReturn(); - ParseHtmlNode(child); - ForceLineReturn(); - } else if (!strcmp(child->Value(), "center")) { - EWOL_VERBOSE("XML center ..."); - HtmlFlush(); - m_alignement = ewol::Text::alignCenter; - ParseHtmlNode(child); - } else if (!strcmp(child->Value(), "left")) { - EWOL_VERBOSE("XML left ..."); - HtmlFlush(); - m_alignement = ewol::Text::alignLeft; - ParseHtmlNode(child); - } else if (!strcmp(child->Value(), "right")) { - EWOL_VERBOSE("XML right ..."); - HtmlFlush(); - m_alignement = ewol::Text::alignRight; - ParseHtmlNode(child); - } else if (!strcmp(child->Value(), "justify")) { - EWOL_VERBOSE("XML justify ..."); - HtmlFlush(); - m_alignement = ewol::Text::alignJustify; - ParseHtmlNode(child); - } else { - EWOL_ERROR("(l "<< child->Row() << ") node not suported type : " << child->Type() << " val=\""<< child->Value() << "\"" ); + if (NULL == element) { + EWOL_ERROR( "Error Input node does not existed ..."); + } + for( TiXmlNode * child = element->FirstChild() ; + NULL != child ; + child = child->NextSibling() ) { + if (child->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do ... + } else if (child->Type()==TiXmlNode::TINYXML_TEXT) { + HtmlAddData(child->Value() ); + EWOL_VERBOSE("XML Add : " << child->Value()); + } else if( !strcmp(child->Value(), "br") + || !strcmp(child->Value(), "BR")) { + HtmlFlush(); + EWOL_VERBOSE("XML flush & newLine"); + ForceLineReturn(); + } else if (!strcmp(child->Value(), "font")) { + EWOL_VERBOSE("XML Font ..."); + TextDecoration tmpDeco = m_htmlDecoTmp; + const char *colorValue = child->ToElement()->Attribute("color"); + if (NULL != colorValue) { + draw::ParseColor(colorValue, m_htmlDecoTmp.m_colorFg); } + colorValue = child->ToElement()->Attribute("colorBg"); + if (NULL != colorValue) { + draw::ParseColor(colorValue, m_htmlDecoTmp.m_colorBg); + } + ParseHtmlNode(child); + m_htmlDecoTmp = tmpDeco; + } else if( !strcmp(child->Value(), "b") + || !strcmp(child->Value(), "bold")) { + EWOL_VERBOSE("XML bold ..."); + TextDecoration tmpDeco = m_htmlDecoTmp; + if (m_htmlDecoTmp.m_mode == ewol::font::Regular) { + m_htmlDecoTmp.m_mode = ewol::font::Bold; + } else if (m_htmlDecoTmp.m_mode == ewol::font::Italic) { + m_htmlDecoTmp.m_mode = ewol::font::BoldItalic; + } + ParseHtmlNode(child); + m_htmlDecoTmp = tmpDeco; + } else if( !strcmp(child->Value(), "i") + || !strcmp(child->Value(), "italic")) { + EWOL_VERBOSE("XML italic ..."); + TextDecoration tmpDeco = m_htmlDecoTmp; + if (m_htmlDecoTmp.m_mode == ewol::font::Regular) { + m_htmlDecoTmp.m_mode = ewol::font::Italic; + } else if (m_htmlDecoTmp.m_mode == ewol::font::Bold) { + m_htmlDecoTmp.m_mode = ewol::font::BoldItalic; + } + ParseHtmlNode(child); + m_htmlDecoTmp = tmpDeco; + } else if( !strcmp(child->Value(), "u") + || !strcmp(child->Value(), "underline")) { + EWOL_VERBOSE("XML underline ..."); + ParseHtmlNode(child); + } else if( !strcmp(child->Value(), "p") + || !strcmp(child->Value(), "paragraph")) { + EWOL_VERBOSE("XML paragraph ..."); + HtmlFlush(); + m_alignement = ewol::Text::alignLeft; + ForceLineReturn(); + ParseHtmlNode(child); + ForceLineReturn(); + } else if (!strcmp(child->Value(), "center")) { + EWOL_VERBOSE("XML center ..."); + HtmlFlush(); + m_alignement = ewol::Text::alignCenter; + ParseHtmlNode(child); + } else if (!strcmp(child->Value(), "left")) { + EWOL_VERBOSE("XML left ..."); + HtmlFlush(); + m_alignement = ewol::Text::alignLeft; + ParseHtmlNode(child); + } else if (!strcmp(child->Value(), "right")) { + EWOL_VERBOSE("XML right ..."); + HtmlFlush(); + m_alignement = ewol::Text::alignRight; + ParseHtmlNode(child); + } else if (!strcmp(child->Value(), "justify")) { + EWOL_VERBOSE("XML justify ..."); + HtmlFlush(); + m_alignement = ewol::Text::alignJustify; + ParseHtmlNode(child); + } else { + EWOL_ERROR("(l "<< child->Row() << ") node not suported type : " << child->Type() << " val=\""<< child->Value() << "\"" ); } } } -void ewol::Text::PrintDecorated(etk::UString& text) +void ewol::Text::PrintDecorated(const etk::UString& _text) { etk::UString tmpData("\n"); - tmpData+=text; + tmpData+=_text; tmpData+="\n\n"; //EWOL_DEBUG("plop : " << tmpData); PrintHTML(tmpData); } -void ewol::Text::PrintHTML(etk::UString text) +void ewol::Text::PrintHTML(const etk::UString& _text) { TiXmlDocument XmlDocument; @@ -574,20 +577,24 @@ void ewol::Text::PrintHTML(etk::UString text) m_htmlDecoTmp.m_colorFg = draw::color::black; m_htmlDecoTmp.m_mode = ewol::font::Regular; - + etk::Char tmpChar = _text.c_str(); // load the XML from the memory - bool loadError = XmlDocument.Parse((const char*)text.c_str(), 0, TIXML_ENCODING_UTF8); + bool loadError = XmlDocument.Parse(tmpChar, 0, TIXML_ENCODING_UTF8); if (false == loadError) { - EWOL_ERROR( "can not load Hightlight XML: PARSING error: Decorated text "); + EWOL_ERROR( "can not load XML: PARSING error: Decorated text "); return; } TiXmlElement* root = XmlDocument.FirstChildElement( "html" ); if (NULL == root) { - EWOL_ERROR( "can not load Hightlight XML: main node not find: \"html\""); + EWOL_ERROR( "can not load XML: main node not find: \"html\""); return; } TiXmlElement* bodyNode = root->FirstChildElement( "body" ); + if (NULL == root) { + EWOL_ERROR( "can not load XML: main node not find: \"body\""); + return; + } (void)ParseHtmlNode(bodyNode); HtmlFlush(); } @@ -601,6 +608,8 @@ void ewol::Text::Print(const etk::UString& text, const etk::VectorGetHeight(m_mode); // Get the kerning ofset : - float kerningOffset = 0.0; + float kerningOffset = 0; if (true==m_kerning) { kerningOffset = myGlyph->KerningGet(m_previousCharcode); if (kerningOffset != 0) { - //EWOL_DEBUG("Kerning between : '" << (char)m_previousCharcode << "'&'" << (char)myGlyph->m_UVal << "' value : " << kerningOffset); + //EWOL_DEBUG("Kerning between : '" << m_previousCharcode << "'&'" << myGlyph->m_UVal << "' value : " << kerningOffset); } } // 0x01 == 0x20 == ' '; @@ -941,7 +956,9 @@ void ewol::Text::Print(const uniChar_t charcode) } } // move the position : + //EWOL_DEBUG(" 5 pos=" << m_position << " advance=" << myGlyph->m_advance.x() << " kerningOffset=" << kerningOffset); m_position.setX(m_position.x() + myGlyph->m_advance.x() + kerningOffset); + //EWOL_DEBUG(" 6 print '" << charcode << "' : start=" << m_sizeDisplayStart << " stop=" << m_sizeDisplayStop << " pos=" << m_position); // Register the previous character m_previousCharcode = charcode; return; @@ -981,13 +998,16 @@ vec3 ewol::Text::CalculateSizeHTML(const etk::UString& text) { // remove intermediate result Reset(); - + //EWOL_DEBUG(" 0 size for=\n" << text); // disable display system m_needDisplay = false; SetPos(vec3(0,0,0) ); // same as print without the end display ... PrintHTML(text); + //EWOL_DEBUG(" 1 Start pos=" << m_sizeDisplayStart); + //EWOL_DEBUG(" 1 Stop pos=" << m_sizeDisplayStop); + // get the last elements m_sizeDisplayStop.setValue(etk_max(m_position.x(), m_sizeDisplayStop.x()) , etk_max(m_position.y(), m_sizeDisplayStop.y()) , @@ -996,6 +1016,8 @@ vec3 ewol::Text::CalculateSizeHTML(const etk::UString& text) etk_min(m_position.y(), m_sizeDisplayStart.y()) , 0); + //EWOL_DEBUG(" 2 Start pos=" << m_sizeDisplayStart); + //EWOL_DEBUG(" 2 Stop pos=" << m_sizeDisplayStop); // set back the display system m_needDisplay = true; @@ -1006,6 +1028,9 @@ vec3 ewol::Text::CalculateSizeHTML(const etk::UString& text) vec3 ewol::Text::CalculateSizeDecorated(const etk::UString& text) { + if (text.Size()==0) { + return vec3(0,0,0); + } etk::UString tmpData("\n"); tmpData+=text; tmpData+="\n\n"; diff --git a/sources/ewol/compositing/Text.h b/sources/ewol/compositing/Text.h index d8ebc012..b5cf2e25 100644 --- a/sources/ewol/compositing/Text.h +++ b/sources/ewol/compositing/Text.h @@ -254,7 +254,7 @@ namespace ewol * @param[in] text The string to display. * @TODO : implementation not done .... */ - void PrintDecorated(etk::UString& text); + void PrintDecorated(const etk::UString& text); /** * @brief Display a compleat string in the current element with the generic decoration specification. (basic html data) *
@@ -286,7 +286,7 @@ namespace ewol
 			 * @param[in] text The string to display.
 			 * @TODO : implementation not done ....
 			 */
-			void PrintHTML(etk::UString text);
+			void PrintHTML(const etk::UString& text);
 			/**
 			 * @brief Display a compleat string in the current element whith specific decorations (advence mode).
 			 * @param[in] text The string to display.
@@ -297,7 +297,7 @@ namespace ewol
 			 * @brief Display the current char in the current element (note that the kerning is availlable if the position is not changed)
 			 * @param[in] char that might be dispalyed
 			 */
-			void Print(const uniChar_t charcode);
+			void Print(const uniChar_t& charcode);
 			/**
 			 * @brief This Generate the line return ==> it return to the alignement position start and at the correct line position ==> it might be use to not know the line height
 			 */
diff --git a/sources/ewol/renderer/resources/TexturedFont.cpp b/sources/ewol/renderer/resources/TexturedFont.cpp
index 558be3d0..397b93f1 100644
--- a/sources/ewol/renderer/resources/TexturedFont.cpp
+++ b/sources/ewol/renderer/resources/TexturedFont.cpp
@@ -16,6 +16,29 @@
 #include 
 #include 
 
+
+etk::CCout& ewol::operator <<(etk::CCout& _os, const ewol::font::mode_te& _obj)
+{
+	switch(_obj) {
+		default :
+			_os << "error";
+			break;
+		case ewol::font::Regular:
+			_os << "Regular";
+			break;
+		case ewol::font::Italic:
+			_os << "Italic";
+			break;
+		case ewol::font::Bold:
+			_os << "Bold";
+			break;
+		case ewol::font::BoldItalic:
+			_os << "BoldItalic";
+			break;
+	}
+	return _os;
+}
+
 #undef __class__
 #define __class__	"TexturedFont"
 
@@ -154,13 +177,14 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
 	// try to find the reference mode :
 	ewol::font::mode_te refMode = ewol::font::Regular;
 	for(int32_t iii=3; iii>=0; iii--) {
-		if (m_fileName[iii] != "") {
+		if (m_fileName[iii].IsEmpty()==false) {
 			refMode = (ewol::font::mode_te)iii;
 		}
 	}
+	EWOL_DEBUG("         Set reference mode : " << refMode);
 	// generate the wrapping on the preventing error
 	for(int32_t iii=3; iii>=0; iii--) {
-		if (m_fileName[iii] != "") {
+		if (m_fileName[iii].IsEmpty()==false) {
 			m_modeWraping[iii] = (ewol::font::mode_te)iii;
 		} else {
 			m_modeWraping[iii] = refMode;
@@ -168,8 +192,8 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
 	}
 	
 	for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
-		if (m_fileName[iiiFontId] == "") {
-			EWOL_CRITICAL("can not load FONT [" << iiiFontId << "] name : \"" << m_fileName[iiiFontId] << "\" ==> size=" << m_size );
+		if (m_fileName[iiiFontId].IsEmpty()==false) {
+			EWOL_DEBUG("can not load FONT [" << iiiFontId << "] name : \"" << m_fileName[iiiFontId] << "\" ==> size=" << m_size );
 			m_font[iiiFontId] = NULL;
 			continue;
 		}
@@ -275,6 +299,11 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) :
 	EWOL_DEBUG("End generation of the Fond bitmap, start adding texture");
 	//m_data.DistanceField();
 	Flush();
+	EWOL_DEBUG("Wrapping properties : ");
+	EWOL_DEBUG("    " << ewol::font::Regular << "==>" << GetWrappingMode(ewol::font::Regular));
+	EWOL_DEBUG("    " << ewol::font::Italic << "==>" << GetWrappingMode(ewol::font::Italic));
+	EWOL_DEBUG("    " << ewol::font::Bold << "==>" << GetWrappingMode(ewol::font::Bold));
+	EWOL_DEBUG("    " << ewol::font::BoldItalic << "==>" << GetWrappingMode(ewol::font::BoldItalic));
 }
 
 ewol::TexturedFont::~TexturedFont(void)
@@ -298,7 +327,7 @@ bool ewol::TexturedFont::HasName(const etk::UString& fileName)
 }
 
 
-int32_t ewol::TexturedFont::GetIndex(const uniChar_t charcode, const ewol::font::mode_te displayMode) const
+int32_t ewol::TexturedFont::GetIndex(const uniChar_t& charcode, const ewol::font::mode_te displayMode) const
 {
 	if (charcode < 0x20) {
 		return 0;
@@ -306,7 +335,7 @@ int32_t ewol::TexturedFont::GetIndex(const uniChar_t charcode, const ewol::font:
 		return charcode.Get() - 0x1F;
 	} else {
 		for (int32_t iii=0x80-0x20; iii < m_listElement[displayMode].Size(); iii++) {
-			if ((m_listElement[displayMode])[iii].m_UVal == charcode) {
+			if (charcode == (m_listElement[displayMode])[iii].m_UVal) {
 				return iii;
 			}
 		}
@@ -315,8 +344,22 @@ int32_t ewol::TexturedFont::GetIndex(const uniChar_t charcode, const ewol::font:
 }
 
 
-ewol::GlyphProperty* ewol::TexturedFont::GetGlyphPointer(const uniChar_t charcode, const ewol::font::mode_te displayMode)
+ewol::GlyphProperty* ewol::TexturedFont::GetGlyphPointer(const uniChar_t& _charcode, const ewol::font::mode_te _displayMode)
 {
-	int32_t index = GetIndex(charcode, displayMode);
-	return &((m_listElement[displayMode])[index]);
+	//EWOL_DEBUG("Get glyph property for mode: " << _displayMode << " ==> wrapping index : " << m_modeWraping[_displayMode]);
+	int32_t index = GetIndex(_charcode, _displayMode);
+	if(    index <0 
+	    || index >=m_listElement[_displayMode].Size() ) {
+		EWOL_ERROR(" Try to get glyph index inexistant ... ==> return the index 0 ... id=" << index);
+		if (m_listElement[_displayMode].Size()>=0) {
+			return &((m_listElement[_displayMode])[0]);
+		}
+		return NULL;
+	}
+	//EWOL_ERROR("      index=" << index);
+	//EWOL_ERROR("      m_UVal=" << m_listElement[_displayMode][index].m_UVal);
+	//EWOL_ERROR("      m_glyphIndex=" << m_listElement[_displayMode][index].m_glyphIndex);
+	//EWOL_ERROR("      m_advance=" << m_listElement[_displayMode][index].m_advance);
+	//EWOL_ERROR("      m_bearing=" << m_listElement[_displayMode][index].m_bearing);
+	return &((m_listElement[_displayMode])[index]);
 }
diff --git a/sources/ewol/renderer/resources/TexturedFont.h b/sources/ewol/renderer/resources/TexturedFont.h
index 0a2fd7f6..61ec6a06 100644
--- a/sources/ewol/renderer/resources/TexturedFont.h
+++ b/sources/ewol/renderer/resources/TexturedFont.h
@@ -25,23 +25,25 @@ namespace ewol
 			BoldItalic,
 		} mode_te;
 	};
+	etk::CCout& operator <<(etk::CCout& _os, const ewol::font::mode_te& _obj);
+	
 	class TexturedFont : public ewol::Texture {
 		
 		private:
-			etk::UString                        m_fileName[4];
-			int32_t                             m_size;
-			int32_t                             m_height[4];
+			etk::UString m_fileName[4];
+			int32_t m_size;
+			int32_t m_height[4];
 			// specific element to have the the know if the specify element is known...
 			// ==> otherwise I can just generate italic ...
 			// ==> Bold is a little more complicated (maybe with the bordersize)
-			ewol::FontBase*                     m_font[4];
-			ewol::font::mode_te                 m_modeWraping[4];     //!< This is a wrapping mode to prevent the fact that no font is define for a specific mode
+			ewol::FontBase* m_font[4];
+			ewol::font::mode_te m_modeWraping[4];     //!< This is a wrapping mode to prevent the fact that no font is define for a specific mode
 		public:
-			etk::Vector          m_listElement[4];
+			etk::Vector m_listElement[4];
 		private:
 			// for the texture generation :
-			ivec2              m_lastGlyphPos[4];
-			int32_t                             m_lastRawHeigh[4];
+			ivec2 m_lastGlyphPos[4];
+			int32_t m_lastRawHeigh[4];
 		public:
 			TexturedFont(etk::UString fontName);
 			~TexturedFont(void);
@@ -65,14 +67,14 @@ namespace ewol
 			 * @param[in] displayMode Mode to display the currrent font
 			 * @return The ID in the table (if it does not exist : return 0)
 			 */
-			int32_t GetIndex(const uniChar_t charcode, const ewol::font::mode_te displayMode) const;
+			int32_t GetIndex(const uniChar_t& charcode, const ewol::font::mode_te displayMode) const;
 			/**
 			 * @brief Get the pointer on the coresponding glyph
 			 * @param[in] charcode The unicodeValue
 			 * @param[in] displayMode Mode to display the currrent font
 			 * @return The pointer on the glyph ==> never NULL
 			 */
-			ewol::GlyphProperty* GetGlyphPointer(const uniChar_t charcode, const ewol::font::mode_te displayMode);
+			ewol::GlyphProperty* GetGlyphPointer(const uniChar_t& charcode, const ewol::font::mode_te displayMode);
 			/**
 			 * @brief The wrapping mode is used to prevent the non existance of a specific mode.
 			 *        For exemple when a blod mode does not exist, this resend a regular mode.
diff --git a/sources/ewol/renderer/resources/font/GlyphProperty.h b/sources/ewol/renderer/resources/font/GlyphProperty.h
index 67bba95e..f67ee494 100644
--- a/sources/ewol/renderer/resources/font/GlyphProperty.h
+++ b/sources/ewol/renderer/resources/font/GlyphProperty.h
@@ -62,6 +62,15 @@ namespace ewol
 		private:
 			etk::Vector m_kerning; //!< kerning values of link of all elements
 		public:
+			GlyphProperty(void) :
+				m_UVal(0),
+				m_glyphIndex(0),
+				m_sizeTexture(0,0),
+				m_bearing(0,0),
+				m_advance(0,0),
+				m_texturePosStart(0,0),
+				m_texturePosStop(0,0)
+			{ };
 			float KerningGet(const uniChar_t charcode)
 			{
 				for(int32_t iii=0; iiiRegisterOnEvent(this, _eventId, _eventIdgenerated, _overloadData);
 	} else {
-		EWOL_WARNING("Can not register event : \"" << _eventId << "\" the widget named=\"" << _subWidgetName << "\" does not exist");
+		EWOL_WARNING("[" << GetId() << "] {" << GetObjectType() << "} Can not register event : \"" << _eventId << "\" the widget named=\"" << _subWidgetName << "\" does not exist");
 	}
 }
diff --git a/sources/ewol/widget/Container.cpp b/sources/ewol/widget/Container.cpp
index 1c802a84..41f38be6 100644
--- a/sources/ewol/widget/Container.cpp
+++ b/sources/ewol/widget/Container.cpp
@@ -54,7 +54,7 @@ void widget::Container::SubWidgetRemove(void)
 		delete(m_subWidget);
 		// might have been destroy first here : 
 		if (m_subWidget!=NULL) {
-			EWOL_ERROR("Composer : An error Occured when removing main node");
+			EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} An error Occured when removing main node");
 		}
 		MarkToRedraw();
 		ewol::RequestUpdateSize();
@@ -133,7 +133,7 @@ void widget::Container::CalculateMinMaxSize(void)
 		vec2 min = m_subWidget->GetCalculateMinSize();
 		m_minSize.setMax(min);
 	}
-	EWOL_ERROR("[" << GetId() << "] Result min size : " <<  m_minSize);
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Result min size : " <<  m_minSize);
 }
 
 void widget::Container::OnRegenerateDisplay(void)
@@ -174,23 +174,23 @@ bool widget::Container::LoadXML(TiXmlNode* _node)
 		}
 		etk::UString widgetName = pNode->Value();
 		if (ewol::widgetManager::Exist(widgetName) == false) {
-			EWOL_ERROR("(l "<Row()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << ewol::widgetManager::List() << "]" );
+			EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << ewol::widgetManager::List() << "]" );
 			continue;
 		}
 		if (NULL != GetSubWidget()) {
-			EWOL_ERROR("(l "<Row()<<") " << __class__ << " Can only have one subWidget ??? node=\"" << widgetName << "\"" );
+			EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") " << __class__ << " Can only have one subWidget ??? node=\"" << widgetName << "\"" );
 			continue;
 		}
-		EWOL_DEBUG("try to create subwidget : '" << widgetName << "'");
+		EWOL_DEBUG("[" << GetId() << "] {" << GetObjectType() << "} try to create subwidget : '" << widgetName << "'");
 		ewol::Widget* tmpWidget = ewol::widgetManager::Create(widgetName);
 		if (tmpWidget == NULL) {
-			EWOL_ERROR ("(l "<Row()<<") Can not create the widget : \"" << widgetName << "\"");
+			EWOL_ERROR ("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") Can not create the widget : \"" << widgetName << "\"");
 			continue;
 		}
 		// add widget :
 		SetSubWidget(tmpWidget);
 		if (false == tmpWidget->LoadXML(pNode)) {
-			EWOL_ERROR ("(l "<Row()<<") can not load widget properties : \"" << widgetName << "\"");
+			EWOL_ERROR ("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") can not load widget properties : \"" << widgetName << "\"");
 			return false;
 		}
 	}
diff --git a/sources/ewol/widget/ContainerN.cpp b/sources/ewol/widget/ContainerN.cpp
index a3a6aa7f..dbf72d2e 100644
--- a/sources/ewol/widget/ContainerN.cpp
+++ b/sources/ewol/widget/ContainerN.cpp
@@ -58,7 +58,7 @@ void widget::ContainerN::LockExpand(const bvec2& _lockExpand)
 void widget::ContainerN::SubWidgetAdd(ewol::Widget* _newWidget)
 {
 	if (NULL == _newWidget) {
-		EWOL_ERROR("[" << GetId() << "] Try to add An empty Widget ... ");
+		EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Try to add An empty Widget ... ");
 		return;
 	}
 	if (_newWidget!=NULL) {
@@ -72,7 +72,7 @@ void widget::ContainerN::SubWidgetAdd(ewol::Widget* _newWidget)
 void widget::ContainerN::SubWidgetAddStart(ewol::Widget* _newWidget)
 {
 	if (NULL == _newWidget) {
-		EWOL_ERROR("[" << GetId() << "] Try to add start An empty Widget ... ");
+		EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Try to add start An empty Widget ... ");
 		return;
 	}
 	if (_newWidget!=NULL) {
@@ -95,7 +95,7 @@ void widget::ContainerN::SubWidgetRemove(ewol::Widget* _newWidget)
 			delete(m_subWidget[iii]);
 			// no remove, this element is removed with the function OnObjectRemove ==> it does not exist anymore ...
 			if (errorControl == m_subWidget.Size()) {
-				EWOL_CRITICAL("[" << GetId() << "] The number of element might have been reduced ... ==> it is not the case ==> the herited class must call the \"OnObjectRemove\" function...");
+				EWOL_CRITICAL("[" << GetId() << "] {" << GetObjectType() << "} The number of element might have been reduced ... ==> it is not the case ==> the herited class must call the \"OnObjectRemove\" function...");
 				m_subWidget[iii] = NULL;
 				m_subWidget.Erase(iii);
 			}
@@ -133,11 +133,11 @@ void widget::ContainerN::SubWidgetRemoveAll(void)
 			delete(m_subWidget[0]);
 			// no remove, this element is removed with the function OnObjectRemove ==> it does not exist anymore ...
 			if (errorControl == m_subWidget.Size()) {
-				EWOL_CRITICAL("[" << GetId() << "] The number of element might have been reduced ... ==> it is not the case ==> the herited class must call the \"OnObjectRemove\" function...");
+				EWOL_CRITICAL("[" << GetId() << "] {" << GetObjectType() << "} The number of element might have been reduced ... ==> it is not the case ==> the herited class must call the \"OnObjectRemove\" function...");
 				m_subWidget[0] = NULL;
 			}
 		} else {
-			EWOL_WARNING("[" << GetId() << "] Must not have null pointer on the subWidget list ...");
+			EWOL_WARNING("[" << GetId() << "] {" << GetObjectType() << "} Must not have null pointer on the subWidget list ...");
 			m_subWidget.Erase(0);
 		}
 		errorControl = m_subWidget.Size();
@@ -168,7 +168,7 @@ void widget::ContainerN::OnObjectRemove(ewol::EObject* _removeObject)
 	// second step find if in all the elements ...
 	for(int32_t iii=m_subWidget.Size()-1; iii>=0; iii--) {
 		if(m_subWidget[iii] == _removeObject) {
-			EWOL_VERBOSE("[" << GetId() << "]={" << GetObjectType() << "} Remove sizer sub Element [" << iii << "/" << m_subWidget.Size()-1 << "] ==> destroyed object");
+			EWOL_VERBOSE("[" << GetId() << "] {" << GetObjectType() << "} Remove sizer sub Element [" << iii << "/" << m_subWidget.Size()-1 << "] ==> destroyed object");
 			m_subWidget[iii] = NULL;
 			m_subWidget.Erase(iii);
 		}
@@ -210,6 +210,7 @@ void widget::ContainerN::CalculateMinMaxSize(void)
 	m_subExpend.setValue(false, false);
 	m_minSize.setValue(0,0);
 	m_maxSize.setValue(ULTIMATE_MAX_SIZE,ULTIMATE_MAX_SIZE);
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Set min size : " <<  m_minSize);
 	for (int32_t iii=0; iiiCalculateMinMaxSize();
@@ -225,6 +226,7 @@ void widget::ContainerN::CalculateMinMaxSize(void)
 			                    etk_max(tmpSize.y(), m_minSize.y()) );
 		}
 	}
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Result min size : " <<  m_minSize);
 }
 
 void widget::ContainerN::OnRegenerateDisplay(void)
@@ -294,12 +296,12 @@ bool widget::ContainerN::LoadXML(TiXmlNode* _node)
 		}
 		etk::UString widgetName = pNode->Value();
 		if (ewol::widgetManager::Exist(widgetName) == false) {
-			EWOL_ERROR("(l "<Row()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << ewol::widgetManager::List() << "]" );
+			EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << ewol::widgetManager::List() << "]" );
 			continue;
 		}
 		ewol::Widget *subWidget = ewol::widgetManager::Create(widgetName);
 		if (subWidget == NULL) {
-			EWOL_ERROR ("(l "<Row()<<") Can not create the widget : \"" << widgetName << "\"");
+			EWOL_ERROR ("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") Can not create the widget : \"" << widgetName << "\"");
 			continue;
 		}
 		// add sub element : 
@@ -309,7 +311,7 @@ bool widget::ContainerN::LoadXML(TiXmlNode* _node)
 			SubWidgetAddStart(subWidget);
 		}
 		if (false == subWidget->LoadXML(pNode)) {
-			EWOL_ERROR ("(l "<Row()<<") can not load widget properties : \"" << widgetName << "\"");
+			EWOL_ERROR ("[" << GetId() << "] {" << GetObjectType() << "} (l "<Row()<<") can not load widget properties : \"" << widgetName << "\"");
 			return false;
 		}
 	}
diff --git a/sources/ewol/widget/Label.cpp b/sources/ewol/widget/Label.cpp
index 6d392f03..9b66b98c 100644
--- a/sources/ewol/widget/Label.cpp
+++ b/sources/ewol/widget/Label.cpp
@@ -42,13 +42,17 @@ widget::Label::Label(etk::UString _newLabel)
 void widget::Label::CalculateMinMaxSize(void)
 {
 	vec2 tmpMax = m_userMaxSize.GetPixel();
+	//EWOL_DEBUG("[" << GetId() << "] {" << GetObjectType() << "} tmpMax : " << tmpMax);
 	if (tmpMax.x() <= 999999) {
 		m_text.SetTextAlignement(0, tmpMax.x()-4, ewol::Text::alignLeft);
+		//EWOL_DEBUG("[" << GetId() << "] {" << GetObjectType() << "}     Forcez Alignement ");
 	}
 	vec3 minSize = m_text.CalculateSizeDecorated(m_label);
+	//EWOL_DEBUG("[" << GetId() << "] {" << GetObjectType() << "} minSize : " << minSize);
 	
 	m_minSize.setX(etk_min(4 + minSize.x(), tmpMax.x()));
 	m_minSize.setY(etk_min(4 + minSize.y(), tmpMax.y()));
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Result min size : " <<  m_minSize);
 }
 
 void widget::Label::SetLabel(const etk::UString& _newLabel)
diff --git a/sources/ewol/widget/PopUp.cpp b/sources/ewol/widget/PopUp.cpp
index b365180b..a8d0ec29 100644
--- a/sources/ewol/widget/PopUp.cpp
+++ b/sources/ewol/widget/PopUp.cpp
@@ -34,35 +34,26 @@ widget::PopUp::~PopUp(void)
 void widget::PopUp::CalculateSize(const vec2& _availlable)
 {
 	ewol::Widget::CalculateSize(_availlable);
-	EWOL_DEBUG(" _availlable : " << _availlable);
 	m_size = _availlable;
 	if (NULL != m_subWidget) {
 		vec2 subElementSize = m_minSize;
-		EWOL_DEBUG("[" << GetId() << "] popUP: m_minSize : " << subElementSize);
 		vec2 subElementOrigin = m_origin + (m_size-m_minSize)/2.0f;
-		EWOL_DEBUG("[" << GetId() << "] popUP: subElementOrigin : " << subElementOrigin);
 		
 		vec2 subWidgetSize = m_subWidget->GetCalculateMinSize();
-		EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize);
 		if (true == m_subWidget->CanExpand().x()) {
 			subWidgetSize.setX(m_minSize.x());
 		}
 		if (true == m_subWidget->CanExpand().y()) {
 			subWidgetSize.setY(m_minSize.y());
 		}
-		EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize);
 		// limit the size of the element :
 		subWidgetSize.setMin(m_minSize);
-		EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize);
 		// posiition at a int32_t pos :
 		subWidgetSize = vec2ClipInt32(subWidgetSize);
-		EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetSize : " << subWidgetSize);
 		
 		// set config to the Sub-widget
 		vec2 subWidgetOrigin = m_origin + (m_size-subWidgetSize)/2.0f;
-		EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetOrigin : " << subWidgetOrigin);
 		subWidgetOrigin = vec2ClipInt32(subWidgetOrigin);
-		EWOL_DEBUG("[" << GetId() << "] popUP: subWidgetOrigin : " << subWidgetOrigin);
 		
 		m_subWidget->SetOrigin(subWidgetOrigin);
 		m_subWidget->CalculateSize(subWidgetSize);
diff --git a/sources/ewol/widget/Sizer.cpp b/sources/ewol/widget/Sizer.cpp
index e2d446f3..4300a81a 100644
--- a/sources/ewol/widget/Sizer.cpp
+++ b/sources/ewol/widget/Sizer.cpp
@@ -66,7 +66,7 @@ void widget::Sizer::CalculateSize(const vec2& _availlable)
 {
 	ewol::Widget::CalculateSize(_availlable);
 	vec2 tmpBorderSize = m_borderSize.GetPixel();
-	EWOL_DEBUG("[" << GetId() << "] Update Size : " << _availlable << " nbElement : " << m_subWidget.Size() << " borderSize=" << tmpBorderSize << " from border=" << m_borderSize);
+	//EWOL_DEBUG("[" << GetId() << "] Update Size : " << _availlable << " nbElement : " << m_subWidget.Size() << " borderSize=" << tmpBorderSize << " from border=" << m_borderSize);
 	m_size -= tmpBorderSize*2;
 	// calculate unExpandable Size :
 	float unexpandableSize=0.0;
@@ -110,7 +110,7 @@ void widget::Sizer::CalculateSize(const vec2& _availlable)
 		if (NULL != m_subWidget[iii]) {
 			vec2 tmpSize = m_subWidget[iii]->GetCalculateMinSize();
 			// Set the origin :
-			EWOL_DEBUG("[" << GetId() << "] Set iii=" << iii << " ORIGIN : " << tmpOrigin << " & offset=" << m_offset);
+			//EWOL_DEBUG("[" << GetId() << "] Set iii=" << iii << " ORIGIN : " << tmpOrigin << " & offset=" << m_offset);
 			m_subWidget[iii]->SetOrigin(vec2ClipInt32(tmpOrigin+m_offset));
 			// Now Update his Size  his size in X and the curent sizer size in Y:
 			if (m_mode==widget::Sizer::modeVert) {
@@ -143,7 +143,7 @@ void widget::Sizer::CalculateMinMaxSize(void)
 	m_subExpend.setValue(false, false);
 	m_minSize = m_userMinSize.GetPixel();
 	vec2 tmpBorderSize = m_borderSize.GetPixel();
-	
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Set min size : " <<  m_minSize);
 	m_minSize += tmpBorderSize*2;
 	for (int32_t iii=0; iiiGetCalculateMinSize();
 			//EWOL_DEBUG("[" << GetId() << "] NewMinSize=" << tmpSize);
-			//EWOL_DEBUG("[" << GetId() << "]     Get minSize[" << iii << "] "<< tmpSize);
+			//EWOL_DEBUG("[" << GetId() << "] {" << GetObjectType() << "}     Get minSize[" << iii << "] "<< tmpSize);
 			if (m_mode==widget::Sizer::modeVert) {
 				m_minSize.setY(m_minSize.y() + tmpSize.y());
 				if (tmpSize.x()>m_minSize.x()) {
@@ -170,6 +170,7 @@ void widget::Sizer::CalculateMinMaxSize(void)
 			}
 		}
 	}
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Result min size : " <<  m_minSize);
 }
 
 bool widget::Sizer::LoadXML(TiXmlNode* _node)
diff --git a/sources/ewol/widget/Widget.cpp b/sources/ewol/widget/Widget.cpp
index a565c641..e49c4cb7 100644
--- a/sources/ewol/widget/Widget.cpp
+++ b/sources/ewol/widget/Widget.cpp
@@ -396,7 +396,7 @@ void ewol::Widget::SetOrigin(const vec2& _pos)
 	#if DEBUG_LEVEL > 2
 		if(    m_origin.x() < -5000
 		    || m_origin.y() < -5000) {
-			EWOL_WARNING("[" << GetId() << "] Set origin < 5000 : " << m_origin);
+			EWOL_WARNING("[" << GetId() << "] {" << GetObjectType() << "} Set origin < 5000 : " << m_origin);
 		}
 	#endif
 	m_origin = _pos;
@@ -415,9 +415,9 @@ vec2 ewol::Widget::RelativePosition(const vec2& _pos)
 void ewol::Widget::CalculateMinMaxSize(void)
 {
 	m_minSize = m_userMinSize.GetPixel();
-	EWOL_ERROR("[" << GetId() << "] convert in min size : " << m_userMinSize << " out=" << m_minSize);
 	m_maxSize = m_userMaxSize.GetPixel();
 	MarkToRedraw();
+	//EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} convert in min size : " << m_userMinSize << " out=" << m_minSize);
 }
 
 vec2 ewol::Widget::GetCalculateMinSize(void)
@@ -449,7 +449,7 @@ void ewol::Widget::SetMinSize(const ewol::Dimension& _size)
 		error=true;
 	}
 	if (error==true) {
-		EWOL_ERROR("Can not set a 'min Size' > 'max size' set nothing ...");
+		EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Can not set a 'min Size' > 'max size' set nothing ...");
 		return;
 	}
 	m_userMinSize = _size;
@@ -481,7 +481,7 @@ void ewol::Widget::SetMaxSize(const ewol::Dimension& _size)
 		error=true;
 	}
 	if (error==true) {
-		EWOL_ERROR("Can not set a 'min Size' > 'max size' set nothing ...");
+		EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} Can not set a 'min Size' > 'max size' set nothing ...");
 		return;
 	}
 	m_userMaxSize = _size;
@@ -551,13 +551,13 @@ void ewol::Widget::ShortCutAdd(const char * _descriptiveString, const char * _ge
 	if(		NULL==_descriptiveString
 		||	0==strlen(_descriptiveString))
 	{
-		EWOL_ERROR("try to add shortcut with no descriptive string ...");
+		EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} try to add shortcut with no descriptive string ...");
 		return;
 	}
 	
 	EventShortCut* tmpElement = new EventShortCut();
 	if (NULL == tmpElement) {
-		EWOL_ERROR("allocation error ... Memory error ...");
+		EWOL_ERROR("[" << GetId() << "] {" << GetObjectType() << "} allocation error ... Memory error ...");
 		return;
 	}
 	tmpElement->broadcastEvent = _broadcast;
diff --git a/sources/ewol/widget/Windows.cpp b/sources/ewol/widget/Windows.cpp
index 5b9ab2bb..14bada08 100644
--- a/sources/ewol/widget/Windows.cpp
+++ b/sources/ewol/widget/Windows.cpp
@@ -52,7 +52,7 @@ ewol::Windows::~Windows(void)
 
 void ewol::Windows::CalculateSize(const vec2& _availlable)
 {
-	EWOL_DEBUG(" _availlable : " << _availlable);
+	//EWOL_DEBUG(" _availlable : " << _availlable);
 	m_size = _availlable;
 	if (NULL != m_subWidget) {
 		m_subWidget->CalculateMinMaxSize();