41 using FontFilePaths = std::array<std::filesystem::path, size_t( FontFile::Count )>;
82 FontFile fontFile{ cFontFileRegular_ };
83 Vector2f scaledOffset;
84 ImFont* fontPtr{
nullptr };
86 std::array<FontData, size_t( FontType::Count )> fonts_;
89 static RibbonFontManager*& getFontManagerInstance_();
92 void updateFontsScaledOffset_();
94 void loadFont_( FontType type,
const ImWchar* ranges );
98 std::function<void(
unsigned char* texData,
int texW )> render;
100 void addCustomGlyphs_( FontType font, std::vector<CustomGlyph>& glyphs );
101 void renderCustomGlyphsToAtlas_(
const std::vector<CustomGlyph>& glyphs );
Definition MRRibbonFontManager.h:11
static MRVIEWER_API void initFontManagerInstance(RibbonFontManager *ribbonFontManager)
static MRVIEWER_API float getFontSizeByType(FontType type)
get font size by font type
FontFile
Definition MRRibbonFontManager.h:30
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:57
std::array< std::filesystem::path, size_t(FontFile::Count)> FontFilePaths
Definition MRRibbonFontManager.h:41
FontType
Definition MRRibbonFontManager.h:16
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