public org.icepdf.core.pobjects.fonts.Font getFont(String s) {
        org.icepdf.core.pobjects.fonts.Font font = null;
        if (fonts != null) {
            Object ob = fonts.get(s);
            // check to make sure the library contains a font
            if (ob instanceof org.icepdf.core.pobjects.fonts.Font) {
                font = (org.icepdf.core.pobjects.fonts.Font) ob;
            }
            // the default value is most likely Reference
            else if (ob instanceof Reference) {
                font = (org.icepdf.core.pobjects.fonts.Font) library.getObject((Reference) ob);
            }
        }
        if (font != null) {
            font.init();
        }
        return font;
    }