From cad47bd419e6d92d1b7daa8e7b98c6b9f95a2d1c Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 27 Jun 2013 22:45:26 +0200 Subject: [PATCH] [DEV] add font multiple --- external/etk | 2 +- external/exml | 2 +- sources/ewol/UserConfig.cpp | 15 +-- sources/ewol/config.cpp | 2 +- sources/ewol/config.h | 2 +- .../ewol/renderer/resources/TexturedFont.cpp | 95 +++++++++++-------- sources/ewol/widget/Button.cpp | 10 +- 7 files changed, 69 insertions(+), 59 deletions(-) diff --git a/external/etk b/external/etk index d2099c51..c60fe032 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit d2099c51e917243edd4bb808f66a32e9df69aa30 +Subproject commit c60fe0326dd06a8750494ee995f90209537049ce diff --git a/external/exml b/external/exml index 628d28e7..5fce0e9e 160000 --- a/external/exml +++ b/external/exml @@ -1 +1 @@ -Subproject commit 628d28e7e13236326eb5f323eb0ac5f835eefab0 +Subproject commit 5fce0e9ef26a8c161d10bbef21abb0faac6a2d8c diff --git a/sources/ewol/UserConfig.cpp b/sources/ewol/UserConfig.cpp index fe66ace7..961a4f9d 100644 --- a/sources/ewol/UserConfig.cpp +++ b/sources/ewol/UserConfig.cpp @@ -134,22 +134,13 @@ bool ewol::userConfig::Load(void) return true; } -#define MAX_SAVING_FILE_HISTORY (9) - bool ewol::userConfig::Save(void) { // step 1 : Move the file to prevent writing error - //Get the first oldest save : - for (int32_t iii=MAX_SAVING_FILE_HISTORY-1; iii>0 ; iii--) { - if (true==etk::FSNodeExist(l_obj().FileName()+"-"+iii) ) { - etk::FSNodeMove(l_obj().FileName()+"-"+iii,l_obj().FileName()+"-"+(iii+1)); - } - } - if (true==etk::FSNodeExist(l_obj().FileName()) ) { - etk::FSNodeMove(l_obj().FileName(),l_obj().FileName()+"-1"); - } + etk::FSNodeHistory(l_obj().FileName(), 9); + exml::Document doc; - doc.Append(new exml::Declaration("1.0", "UTF-8", "")); + doc.Append(new exml::Declaration("1.0", unicode::EDN_CHARSET_UTF8, "")); exml::Element * ElementBase = new exml::Element("config"); doc.Append(ElementBase); for (int32_t iii=0; iii output; myFolder.FolderGetRecursiveFiles(output); - for (int32_t iii=0; iii split = m_name.Split(';'); + EWOL_INFO("try to find font named : '" << split << "' in : '" << myFolder <<"'"); + //EWOL_CRITICAL("parse string : " << split); + + for (int32_t jjj=0; jjj=0; iii--) { @@ -181,6 +199,7 @@ ewol::TexturedFont::TexturedFont(etk::UString fontName) : 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--) { diff --git a/sources/ewol/widget/Button.cpp b/sources/ewol/widget/Button.cpp index a1967ffb..7c319f59 100644 --- a/sources/ewol/widget/Button.cpp +++ b/sources/ewol/widget/Button.cpp @@ -430,20 +430,20 @@ ewol::Widget* widget::Button::GetWidgetNamed(const etk::UString& _widgetName) } -bool widget::Button::LoadXML(exml::Element* _node) +bool widget::Button::LoadXML(exml::Element* _element) { - if (NULL==_node) { + if (NULL==_element) { return false; } // parse generic properties : - ewol::Widget::LoadXML(_node); + ewol::Widget::LoadXML(_element); // remove previous element : SetSubWidget(NULL); SetSubWidgetToggle(NULL); // parse all the elements : - for(int32_t iii=0; iii< _node->Size(); iii++) { - exml::Element* pNode = _node->GetElement(iii); + for(int32_t iii=0; iii< _element->Size(); iii++) { + exml::Element* pNode = _element->GetElement(iii); if (pNode==NULL) { // trash here all that is not element continue;