Mercurial > hg > orthanc
changeset 2942:e9613a09cf9e
added FontRegistry::FindFont
author | am@osimis.io |
---|---|
date | Thu, 29 Nov 2018 15:26:31 +0100 |
parents | 577786f59252 |
children | 9f6716008066 |
files | Core/Images/FontRegistry.cpp Core/Images/FontRegistry.h |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Images/FontRegistry.cpp Wed Nov 28 14:48:14 2018 +0100 +++ b/Core/Images/FontRegistry.cpp Thu Nov 29 15:26:31 2018 +0100 @@ -88,4 +88,18 @@ return *fonts_[i]; } } + + const Font* FontRegistry::FindFont(const std::string& fontName) const + { + for (Fonts::const_iterator it = fonts_.begin(); it != fonts_.end(); it++) + { + if ((*it)->GetName() == fontName) + { + return *it; + } + } + + return NULL; + } + }