*/
private static void loadFonts()
{
try
{
FontFileFinder fontfinder = new FontFileFinder();
List<URI> fonts = fontfinder.find();
for (URI font : fonts)
{
try
{
// the URL may contain some escaped characters like spaces
// use the URI to decode such escape sequences
String fontfilename = new File(font).getPath();
if (fontfilename.toLowerCase().endsWith(".ttf"))
{
analyzeTTF(fontfilename);
}
else
{
LOG.debug("Unsupported font format for external font: " + fontfilename);
}
}
catch (IOException exception)
{
LOG.debug("Can't read external font: " + font.getPath(), exception);
}
}
addFontMapping(fontfinder.getCommonTTFMapping(), fontMappingTTF);
createFontmapping();
}
catch (IOException exception)
{
LOG.error("An error occured when collecting external fonts.", exception);