I made a small function that iterates over a string and puts new texture coordinates in a buffer according to the coordinates of each character in the 256x256 font texture, so I can render the text with OpenGL vertex arrays.
private void updateTexCoords() { float unit = 0.0625f; byte[] arr = string.getBytes(); for(int i = 0; i < string.length()*8; i += 8) { float x = (float)(((int)arr[i/8] & 0xff)%16)*unit; float y = (float)(((int)arr[i/8] & 0xff)/16)*unit; //axis center is at (0,1) pointing right, down texture[0+i] = x; texture[1+i] = y+unit; //bottom left texture[2+i] = x; texture[3+i] = y; //top left texture[4+i] = x+unit; texture[5+i] = y+unit; //bottom right texture[6+i] = x+unit; texture[7+i] = y; //top right } ByteBuffer byteBuffer = ByteBuffer.allocateDirect(texture.length * 4); byteBuffer.order(ByteOrder.nativeOrder()); textureBuffer = byteBuffer.asFloatBuffer(); textureBuffer.put(texture); textureBuffer.position(0); } It works excellent for all of the devices tested on except one old phone, HTC nexus one, where it shows messed up symbols although there is a pattern and you see that basically the texture coordinates given to it are somehow wrong. What could cause such a problem on one specific device, especially when working in Java and not messing with the native hardware-related things?