You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Bart Allen <ba...@barticus.net> on 2009/03/04 19:23:44 UTC

PDResources getFonts() returns null values in the Map

PDResources getFonts() immediately calls  getFonts(Map fontCache), but calls
it with a null.

The getFonts(Map fontCache) calls PDFontFactory.createFont( fontDictionary,
fontCache).

PDFontFactory.createFont(fontDictionary, fontCache) returns a null if the
fontCache is null, making it so that the PDFont that should be the value
matching to the font name key is always null.

I think that PDFontFactory.creatFont(COSDictionary dic, Map fontCache)
should have an else added to the if (fontCache != null) that reads:

else

{

                retval = createFont( dic );

}