comparison OrthancServer/OrthancInitialization.cpp @ 1610:2dff2bdffdb8

font support within Orthanc
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 04 Sep 2015 13:44:21 +0200
parents f2e3d030ea59
children d3ba98d6b6e9
comparison
equal deleted inserted replaced
1609:c74495267acf 1610:2dff2bdffdb8
73 { 73 {
74 static boost::mutex globalMutex_; 74 static boost::mutex globalMutex_;
75 static Json::Value configuration_; 75 static Json::Value configuration_;
76 static boost::filesystem::path defaultDirectory_; 76 static boost::filesystem::path defaultDirectory_;
77 static std::string configurationAbsolutePath_; 77 static std::string configurationAbsolutePath_;
78 static FontRegistry fontRegistry_;
78 79
79 80
80 static std::string GetGlobalStringParameterInternal(const std::string& parameter, 81 static std::string GetGlobalStringParameterInternal(const std::string& parameter,
81 const std::string& defaultValue) 82 const std::string& defaultValue)
82 { 83 {
346 347
347 #if ORTHANC_JPEG_ENABLED == 1 348 #if ORTHANC_JPEG_ENABLED == 1
348 LOG(WARNING) << "Registering JPEG codecs"; 349 LOG(WARNING) << "Registering JPEG codecs";
349 DJDecoderRegistration::registerCodecs(); 350 DJDecoderRegistration::registerCodecs();
350 #endif 351 #endif
352
353 fontRegistry_.AddFromResource(EmbeddedResources::FONT_UBUNTU_MONO_BOLD_16);
351 } 354 }
352 355
353 356
354 357
355 void OrthancFinalize() 358 void OrthancFinalize()
918 { 921 {
919 return CreateFilesystemStorage(); 922 return CreateFilesystemStorage();
920 } 923 }
921 924
922 925
923
924 void Configuration::GetConfiguration(Json::Value& result) 926 void Configuration::GetConfiguration(Json::Value& result)
925 { 927 {
926 boost::mutex::scoped_lock lock(globalMutex_); 928 boost::mutex::scoped_lock lock(globalMutex_);
927 result = configuration_; 929 result = configuration_;
928 } 930 }
934 GetConfiguration(config); 936 GetConfiguration(config);
935 937
936 Json::StyledWriter w; 938 Json::StyledWriter w;
937 result = w.write(config); 939 result = w.write(config);
938 } 940 }
941
942
943 const FontRegistry& Configuration::GetFontRegistry()
944 {
945 return fontRegistry_;
946 }
939 } 947 }