Render hover text in monospace

- TODO: Configure separate font size for monospace
This commit is contained in:
Dan Paulat 2023-07-21 22:34:19 -05:00
parent 48d71cc14d
commit 8be32a8998
9 changed files with 58 additions and 8 deletions

View file

@ -299,6 +299,16 @@ void FontImpl::CreateImGuiFont(QFile& fontFile,
}
}
ImFont* Font::ImGuiFont(std::size_t fontPixelSize)
{
auto it = p->imGuiFonts_.find(fontPixelSize);
if (it != p->imGuiFonts_.cend())
{
return it->second;
}
return nullptr;
}
std::shared_ptr<Font> Font::Create(const std::string& resource)
{
logger_->debug("Loading font file: {}", resource);