38 using FontFilePaths = std::array<std::filesystem::path, size_t( FontFile::Count )>;
43 MRVIEWER_API
void loadAllFonts( ImWchar* charRanges,
float scaling );
72 FontFile fontFile{ FontFile::Regular };
73 Vector2f scaledOffset;
74 ImFont* fontPtr{
nullptr };
76 std::array<FontData, size_t( FontType::Count )> fonts_;
79 static RibbonFontManager*& getFontManagerInstance_();
82 void updateFontsScaledOffset_(
float scaling );
84 void loadFont_( FontType type,
const ImWchar* ranges,
float scaling );
88 std::function<void(
unsigned char* texData,
int texW )> render;
90 void addCustomGlyphs_( FontType font,
float scaling, std::vector<CustomGlyph>& glyphs );
91 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:54
std::array< std::filesystem::path, size_t(FontFile::Count)> FontFilePaths
Definition MRRibbonFontManager.h:38
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, float scaling)
load all fonts using in ribbon menu
MRVIEWER_API std::filesystem::path getMenuFontPath() const
get ribbon menu font path
Definition MRCameraOrientationPlugin.h:8