// final URL url = ClassLoader.getSystemResource(name);
final ClassLoader cl = Thread.currentThread()
.getContextClassLoader();
final URL url = cl.getResource(resName);
if (url != null) {
return new TTFFontDataFile(url);
} else {
throw new Error("Cannot find font resource " + resName);
}
} catch (IOException ex) {
throw new Error("Cannot find font " + resName + ": " + ex.getMessage());