[fonts] Add ImFontConfig->FontData and ImFontConfig->FontDataSize
This commit is contained in:
1 parent
f16672b80a
commit
876c80e861
1 file changed
+31
@@ -46,6 +46,37 @@ public final class ImFontConfig implements ImDestroyable {
|
|||||||
delete (ImFontConfig*)ptr;
|
delete (ImFontConfig*)ptr;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TTF/OTF data
|
||||||
|
*/
|
||||||
|
public native byte[] getFontData(); /*
|
||||||
|
int size = IM_FONT_CONFIG->FontDataSize;
|
||||||
|
jbyteArray jBytes = env->NewByteArray(size);
|
||||||
|
env->SetByteArrayRegion(jBytes, 0, size, (jbyte*)IM_FONT_CONFIG->FontData);
|
||||||
|
return jBytes;
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TTF/OTF data
|
||||||
|
*/
|
||||||
|
public native void setFontData(byte[] fontData); /*
|
||||||
|
IM_FONT_CONFIG->FontData = &fontData[0];
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TTF/OTF data size
|
||||||
|
*/
|
||||||
|
public native int getFontDataSize(); /*
|
||||||
|
return IM_FONT_CONFIG->FontDataSize;
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TTF/OTF data size
|
||||||
|
*/
|
||||||
|
public native void setFontDataSize(int fontDataSize); /*
|
||||||
|
IM_FONT_CONFIG->FontDataSize = fontDataSize;
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
|
* TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user