فهرست منبع

Merge remote-tracking branch 'origin/dev' into ref-dest-rect

dmuratshin 9 سال پیش
والد
کامیت
063e2ce01e

+ 3 - 2
oxygine/src/core/s3e/HttpRequestTaskS3E.cpp

@@ -2,14 +2,15 @@
 
 namespace oxygine
 {
-    spHttpRequestTask HttpRequestTask::create()
+    static HttpRequestTask* createS3E()
     {
         return new HttpRequestTaskS3E;
     }
+     
 
     void HttpRequestTask::init()
     {
-
+        setCustomRequests(createS3E);
     }
 
     void HttpRequestTask::release()

+ 18 - 0
oxygine/src/res/ResFontBM.cpp

@@ -415,6 +415,7 @@ namespace oxygine
         }
 
         _font->sortGlyphs();
+        _finalize();
     }
     /////////////////////////////////////////////////////////
 
@@ -436,6 +437,22 @@ namespace oxygine
         _pages.push_back(p);
     }
 
+    void ResFontBM::_finalize()
+    {
+        const glyph *g = _font->getGlyph(0xA0);
+        if (g)
+            return;
+        
+        g = _font->getGlyph(' ');
+        if (!g)
+            return;
+
+        glyph p = *g;
+        p.ch = 0xA0;
+        _font->addGlyph(p);
+        
+    }
+
     void ResFontBM::_createFont(CreateResourceContext* context, bool sd, bool bmc, int downsample)
     {
         _sdf = sd;
@@ -593,6 +610,7 @@ namespace oxygine
         }
 
         font->sortGlyphs();
+        _finalize();
     }
 
     void ResFontBM::_unload()

+ 1 - 0
oxygine/src/res/ResFontBM.h

@@ -49,6 +49,7 @@ namespace oxygine
         void _restore(Restorable*, void*);
         void _createFont(CreateResourceContext* context, bool sd, bool bmc, int downsample);
         void _createFontFromTxt(CreateResourceContext* context, char* fontData, const std::string& fontPath, int downsample);
+        void _finalize();
 
         typedef std::vector<page> pages;
         pages _pages;

+ 1 - 1
oxygine/src/text_utils/TextBuilder.cpp

@@ -54,7 +54,7 @@ namespace oxygine
             std::string str = "<r>" + st + "</r>";
             pugi::xml_document doc;
 
-            int flags = pugi::parse_default;
+            int flags = pugi::parse_default | pugi::parse_ws_pcdata;
             pugi::xml_parse_result res = doc.load_buffer(str.c_str(), str.size(), flags);
             if (!res)
             {