@Override
 public Font loadFont(String path, double size) {
   FontFactory factory = getFontFactoryFromPipeline();
   PGFont font = factory.loadEmbeddedFont(null, path, (float) size, true);
   if (font != null) return createFont(font);
   return null;
 }
 private void loadEmbeddedFonts() {
   if (!embeddedFontsLoaded) {
     FontFactory fontFactory = getFontFactoryFromPipeline();
     if (!fontFactory.hasPermission()) {
       embeddedFontsLoaded = true;
       return;
     }
     Properties map = loadEmbeddedFontDefinitions();
     Enumeration<?> names = map.keys();
     ClassLoader loader = Thread.currentThread().getContextClassLoader();
     while (names.hasMoreElements()) {
       String n = (String) names.nextElement();
       String p = map.getProperty(n);
       if (p.startsWith("/")) {
         p = p.substring(1);
         try (InputStream in = loader.getResourceAsStream(p)) {
           fontFactory.loadEmbeddedFont(n, in, 0, true);
         } catch (Exception e) {
         }
       }
     }
     embeddedFontsLoaded = true;
   }
 }