]> git.sesse.net Git - casparcg/commitdiff
* Removed use of system font folder in favor of only using the configurable fonts...
authorHelge Norberg <helge.norberg@svt.se>
Tue, 19 May 2015 17:25:20 +0000 (19:25 +0200)
committerHelge Norberg <helge.norberg@svt.se>
Tue, 19 May 2015 17:25:20 +0000 (19:25 +0200)
* Ignored get_call_stack in stack traces on Linux.

common/env.cpp
common/env.h
common/os/linux/stack_trace.cpp
core/producer/scene/scene_producer.cpp
core/producer/text/text_producer.cpp

index 6e45a813860ecfa1b4a838941846bebae986dc8b..db8429fde792cb80f9007ea1373f6a7e43ccc4e2 100644 (file)
@@ -70,7 +70,7 @@ void configure(const std::wstring& filename)
                log                     = paths.get(L"log-path", initialPath + L"/log/");
                ftemplate       = boost::filesystem::complete(paths.get(L"template-path", initialPath + L"/template/")).wstring();
                data            = paths.get(L"data-path", initialPath + L"/data/");
-               font            = paths.get(L"font-path", initialPath + L"/fonts/");
+               font            = paths.get(L"fonts-path", initialPath + L"/fonts/");
                thumbnails      = paths.get(L"thumbnails-path", initialPath + L"/data/");
        }
        catch(...)
@@ -218,9 +218,4 @@ const boost::property_tree::wptree& properties()
        return pt;
 }
 
-std::wstring system_font_folder()
-{
-       return L"C:\\windows\\Fonts\\";
-}
-
 }}
index 7be75018e49209e34a1ad99e41e55527b6c9703e..c7c78ff06872e75b903c8e02c70f68b460384f47 100644 (file)
@@ -34,11 +34,9 @@ const std::wstring& log_folder();
 const std::wstring& template_folder();
 const std::wstring& data_folder();
 const std::wstring& thumbnails_folder();
-const std::wstring& version();
-
 const std::wstring& font_folder();
-std::wstring system_font_folder();
+const std::wstring& version();
 
 const boost::property_tree::wptree& properties();
 
-} }
\ No newline at end of file
+} }
index 45f2bbaee14eec0e8b776112342b8df501e0b514..04cc6cc3dfcba7ab3dfd796ae506590f0a1bcca0 100644 (file)
@@ -80,10 +80,14 @@ std::wstring get_call_stack()
        {
                auto entries = std::shared_ptr<char*>(strings, free);
                std::wostringstream stream;
+               stream << std::endl;
 
                for (int i = 0; i != size; ++i)
                {
-                       stream << demangle(strings[i]).c_str() << std::endl;
+                       auto demangled = demangle(strings[i]);
+
+                       if (demangled.find("caspar::get_call_stack") == std::string::npos)
+                               stream << demangled.c_str() << std::endl;
                }
 
                return stream.str();
index 4a0f65e3d6dd035622034f52105255c15a08630f..6e9cbdceef6a38ca38e12a309dae20646f10f0d8 100644 (file)
@@ -377,7 +377,7 @@ spl::shared_ptr<core::frame_producer> create_dummy_scene_producer(const spl::sha
        auto scene = spl::make_shared<scene_producer>(format_desc.width, format_desc.height);
 
        text::text_info text_info;
-       text_info.font = L"Arial";
+       text_info.font = L"ArialMT";
        text_info.size = 62;
        text_info.color.r = 1;
        text_info.color.g = 1;
index 94e654f4f376c36b0e124098df02a35f846065e3..3c1a583eb66ba065d52d07efd8027c06508f2621 100644 (file)
@@ -79,7 +79,7 @@ namespace caspar { namespace core {
                        if(err) 
                                return result;
 
-                       auto fonts = directory_iterator(env::system_font_folder());
+                       auto fonts = directory_iterator(env::font_folder());
                        auto end = directory_iterator();
                        for(; fonts != end; ++fonts)
                        {
@@ -110,8 +110,7 @@ namespace caspar { namespace core {
                void init()
                {
                        fonts = enumerate_fonts();
-                       if(!fonts.empty())
-                               register_producer_factory(&create_text_producer);
+                       register_producer_factory(&create_text_producer);
                }
 
                text_info& find_font_file(text_info& info)