if (tis != null) {
try {
if (tis.hasFile()) {
Font.createFont(Font.TRUETYPE_FONT, tis.getFile());
} else {
tis.mark(0);
Font.createFont(Font.TRUETYPE_FONT, stream);
tis.reset();
}
} catch (FontFormatException ex) {
throw new TikaException("Bad TrueType font.");