public boolean loadFile(final com.badlogic.gdx.files.FileHandle fileHandle) {
   final int len = (int) fileHandle.length();
   if (len <= 0) throw new com.badlogic.gdx.utils.GdxRuntimeException("Incorrect file specified");
   java.nio.ByteBuffer buff = BufferUtils.newByteBuffer(len);
   buff.put(fileHandle.readBytes());
   buff.position(0);
   boolean result = loadFileFromMemory(buff, len);
   //		com.badlogic.gdx.utils.BufferUtils.disposeUnsafeByteBuffer(buff);
   return result;
 }
Пример #2
0
 public static Face newFace(Library library, FileHandle font, int faceIndex) {
   byte[] data = font.readBytes();
   return newMemoryFace(library, data, data.length, faceIndex);
 }