How to configure Google AppEngine to work with vector graphic?

前端 未结 1 727
Happy的楠姐
Happy的楠姐 2021-01-12 04:54

In AppEngine standard environment with Java8 during attempt to use SVG next error appears. I get this error when I try to draw SVG on a XSLFSlide with POI like slide.d

1条回答
  •  囚心锁ツ
    2021-01-12 05:31

    I've faced the same problem and managed to solve it by explicitly telling the AppEngine VM a specific font configuration to pick up, by setting the "sun.awt.fontconfig" system property. Try inserting the following code somewhere at the very beginning of your source code (before using any font or graphic components):

        String fontConfig = System.getProperty("java.home")
                + File.separator + "lib"
                + File.separator + "fontconfig.Prodimage.properties";
        if (new File(fontConfig).exists())
            System.setProperty("sun.awt.fontconfig", fontConfig);
    

    0 讨论(0)
提交回复
热议问题