private FontFile getType1Fonts(String fontName, int flags) {
        FontFile font = null;
        boolean found = false;
        boolean isType1Available = true;
        // find a match for family in the type 1 nfont table
        for (int i = 0, max = TYPE1_FONT_DIFFS.length; i < max; i++) {
            for (int j = 0, max2 = TYPE1_FONT_DIFFS[i].length; j < max2; j++) {
                // first check to see font name matches any elements
                if (TYPE1_FONT_DIFFS[i][0].indexOf(fontName) >= 0) {
                    // next see if know type1 fonts are installed
                    if (isType1Available) {
                        font = findFont(TYPE1_FONT_DIFFS[i][1], flags);
                        if (font != null) {
                            found = true;
                            break;
                        } else {
                            isType1Available = false;
                        }
                    }
                    // do a full search for possible matches.
                    font = findFont(TYPE1_FONT_DIFFS[i][j], flags);
                    if (font != null) {
                        found = true;
                        break;
                    }
                }

            }
            // break out of second loop
            if (found) break;
        }
        return font;
    }