[fonts] Add ImFont

This commit is contained in:
SpaiR committed 2020-02-10 22:02:44 +03:00
1 parent 944b805efd
commit e28eefd789
3 files changed
+214 -9

No files matched your search

+10 -9
View File
@@ -19,10 +19,6 @@ public final class ImGuiIO {
#include "jni_callbacks.h"
*/
private native long nGetFontsPtr(); /*
return (long)ImGui::GetIO().Fonts;
*/
//------------------------------------------------------------------
// Configuration (fill once)
//------------------------------------------------------------------
@@ -170,19 +166,24 @@ public final class ImGuiIO {
return imFontAtlas;
}
private native long nGetFontsPtr(); /*
return (long)ImGui::GetIO().Fonts;
*/
/**
* Font atlas: load, rasterize and pack one or more fonts into a single texture.
* <p>
* BINDING NOTICE: You should manually destroy previously used ImFontAtlas:
* <pre>
* io.getFonts().destroy();
* io.setFonts(newImFontAtlas);
* </pre>
* BINDING NOTICE: You SHOULD manually destroy previously used ImFontAtlas.
*/
public void setFonts(final ImFontAtlas imFontAtlas) {
this.imFontAtlas = imFontAtlas;
nSetImFontAtlas(imFontAtlas.ptr);
}
private native void nSetImFontAtlas(long imFontAtlasPtr); /*
ImGui::GetIO().Fonts = (ImFontAtlas*)imFontAtlasPtr;
*/
// TODO fonts configuration
// Miscellaneous options