Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Images/Font.cpp @ 4297:785a2713323e
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 17:20:49 +0100 |
parents | bf7b9edf6b81 |
children | 3af1d763763a |
comparison
equal
deleted
inserted
replaced
4296:3b70a2e6a06c | 4297:785a2713323e |
---|---|
40 #include <memory> | 40 #include <memory> |
41 #include <boost/lexical_cast.hpp> | 41 #include <boost/lexical_cast.hpp> |
42 | 42 |
43 namespace Orthanc | 43 namespace Orthanc |
44 { | 44 { |
45 Font::Font() : | |
46 size_(0), | |
47 maxHeight_(0) | |
48 { | |
49 } | |
50 | |
51 | |
45 Font::~Font() | 52 Font::~Font() |
46 { | 53 { |
47 for (Characters::iterator it = characters_.begin(); | 54 for (Characters::iterator it = characters_.begin(); |
48 it != characters_.end(); ++it) | 55 it != characters_.end(); ++it) |
49 { | 56 { |
139 SystemToolbox::ReadFile(font, path); | 146 SystemToolbox::ReadFile(font, path); |
140 LoadFromMemory(font); | 147 LoadFromMemory(font); |
141 } | 148 } |
142 #endif | 149 #endif |
143 | 150 |
144 | 151 const std::string &Font::GetName() const |
145 static unsigned int MyMin(unsigned int a, | 152 { |
153 return name_; | |
154 } | |
155 | |
156 unsigned int Font::GetSize() const | |
157 { | |
158 return size_; | |
159 } | |
160 | |
161 | |
162 static unsigned int MyMin(unsigned int a, | |
146 unsigned int b) | 163 unsigned int b) |
147 { | 164 { |
148 return a < b ? a : b; | 165 return a < b ? a : b; |
149 } | 166 } |
150 | 167 |