comparison Core/Images/FontRegistry.cpp @ 4031:e3b3af80732d

ServerResources, and moving EmbeddedResourceHttpHandler from Core to OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Jun 2020 21:31:13 +0200
parents 2a170a8f1faf
children
comparison
equal deleted inserted replaced
4030:100fbe970762 4031:e3b3af80732d
65 fonts_.push_back(f.release()); 65 fonts_.push_back(f.release());
66 } 66 }
67 #endif 67 #endif
68 68
69 69
70 #if ORTHANC_HAS_EMBEDDED_RESOURCES == 1
71 void FontRegistry::AddFromResource(EmbeddedResources::FileResourceId resource)
72 {
73 std::string content;
74 EmbeddedResources::GetFileResource(content, resource);
75 AddFromMemory(content);
76 }
77 #endif
78
79
80 const Font& FontRegistry::GetFont(size_t i) const 70 const Font& FontRegistry::GetFont(size_t i) const
81 { 71 {
82 if (i >= fonts_.size()) 72 if (i >= fonts_.size())
83 { 73 {
84 throw OrthancException(ErrorCode_ParameterOutOfRange); 74 throw OrthancException(ErrorCode_ParameterOutOfRange);