|
rigImGui 0.1.1
RigKit pack API - rigImGui
|
Reusable font path + optional size control for Preferences / effect UIs. More...
Functions | |
| std::vector< std::string > | listInstalledFonts () |
| Filenames (not full paths) found under the fonts data directory. | |
| std::string | resolveFontPath (const std::string &pathOrName) |
| Resolve relative name against fonts dir, or return absolute path as-is. | |
| bool | draw (const char *strId, std::string &path, float *sizePx, IMui *ui, std::function< void(std::string)> onBrowse=nullptr, float *weight=nullptr) |
| Draw combo of installed fonts + Browse... (+ optional size / weight). | |
| bool | bakeGlyphAtlas (const std::string &fontPathOrName, float sizePixels, const char *codepoints, unsigned &outTexture, int &outW, int &outH, std::vector< float > &outUVs) |
| Bake a standalone glyph atlas (ImGui atlas builder to GL texture). | |
Reusable font path + optional size control for Preferences / effect UIs.
Lists TTFs under AppPaths::getFontsDir(), Browse via IMui file dialog.
| bool rigkit::FontPicker::bakeGlyphAtlas | ( | const std::string & | fontPathOrName, |
| float | sizePixels, | ||
| const char * | codepoints, | ||
| unsigned & | outTexture, | ||
| int & | outW, | ||
| int & | outH, | ||
| std::vector< float > & | outUVs ) |
Bake a standalone glyph atlas (ImGui atlas builder to GL texture).
Does not touch the live UI font. Caller owns outTexture (glDeleteTextures). outUVs is 4 floats per character in codepoints (u0,v0,u1,v1).
| bool rigkit::FontPicker::draw | ( | const char * | strId, |
| std::string & | path, | ||
| float * | sizePx, | ||
| IMui * | ui, | ||
| std::function< void(std::string)> | onBrowse = nullptr, | ||
| float * | weight = nullptr ) |
Draw combo of installed fonts + Browse... (+ optional size / weight).
| sizePx | Null to hide size control. |
| ui | Used for Browse (openFileDialog). May be null (Browse disabled). |
| onBrowse | Optional; when set, Browse uses this instead of writing path (required when path is a temporary). |
| weight | Null to hide the wght slider (100-900). Needs a variable font plus FreeType at load time. |