{
// this is one possible case of an incomplete subfont which leads to a font exception
if (getFontEncoding() instanceof WinAnsiEncoding)
{
TTFParser ttfParser = new TTFParser(true);
TrueTypeFont ttf = ttfParser.parseTTF(inputStream);
TTFSubFont ttfSub = new TTFSubFont(ttf, "PDFBox-Rebuild");
for (int i=getFirstChar();i<=getLastChar();i++)
{
ttfSub.addCharCode(i);
}