1. Register Font
Font font = Font.createFont(Font.TRUETYPE_FONT, new
File("input/myfont.ttf"));
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
ge.registerFont(font);
String[] names = ge.getAvailableFontFamilyNames();
2. Set font name as font family:
XSLFTextParagraph p =...
XSLFTextRun r = p.addNewTextRun();
for (String name : names) {
r.setFontFamily(name);
}
Will support all available font family or just get the last one of Array?
--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]