Texture texture = Assets.getTexture(moduleName, textureName);
if (texture == null) {
throw new IOException("Failed to load font - unable to resolve font page '" + textureName + "'");
}
MaterialData materialData = new MaterialData(Assets.getShader("engine:font"));
materialData.setParam("texture", texture);
AssetUri matName = new AssetUri(AssetType.MATERIAL, moduleName, textureName + "_font");
Material pageMat = Assets.generateAsset(matName, materialData, Material.class);
builder.addPage(pageId, texture, pageMat);
} else {