43 using FontFilePaths = std::array<std::filesystem::path, size_t( FontFile::Count )>;
88 FontFile fontFile{ cFontFileRegular_ };
89 Vector2f scaledOffset;
90 ImFont* fontPtr{
nullptr };
92 std::array<FontData, size_t( FontType::Count )> fonts_;
95 static RibbonFontManager*& getFontManagerInstance_();
98 void updateFontsScaledOffset_();
100 void loadFont_( FontType type,
const ImWchar* ranges );
Definition MRRibbonFontManager.h:12
static MRVIEWER_API void initFontManagerInstance(RibbonFontManager *ribbonFontManager)
static MRVIEWER_API float getFontSizeByType(FontType type)
get font size by font type
FontFile
Definition MRRibbonFontManager.h:32
static MRVIEWER_API FontAndSize getFontAndSizeByTypeStatic(FontType type)
static MRVIEWER_API ImFont * getFontByTypeStatic(FontType type)
MRVIEWER_API void setNewFontPaths(const FontFilePaths &paths)
const FontFilePaths & getAllFontPaths() const
returns list of all font paths
Definition MRRibbonFontManager.h:59
std::array< std::filesystem::path, size_t(FontFile::Count)> FontFilePaths
Definition MRRibbonFontManager.h:43
FontType
Definition MRRibbonFontManager.h:17
MRVIEWER_API RibbonFontManager()
MRVIEWER_API ImFont * getFontByType(FontType type) const
get font by font type
MRVIEWER_API void loadAllFonts(ImWchar *charRanges)
load all fonts using in ribbon menu
MRVIEWER_API std::filesystem::path getMenuFontPath() const
get ribbon menu font path
Definition MRCameraOrientationPlugin.h:8
std::pair< ImFont *, float > FontAndSize
Definition MRViewerFwd.h:89