I try to setFontFamily("Arial")
to XWPFRun object with setText("Привет Hello")
- cyrillic a english. English text will become Arial after this method call, but Russian text will be still at Colibri font family. How to create right font family for cyrillic text?
2
votes
1 Answers
4
votes
Comment to setFontFamily()
says:
Specifies the fonts which shall be used to display the text contents of this run. Specifies a font which shall be used to format all characters in the ASCII range (0 - 127) within the parent run
To other char try use CTFonts.setHAnsi
, for example myXWPFRun.getCTR().getRPr().getRFonts().setHAnsi("Arial");
See bug https://issues.apache.org/bugzilla/show_bug.cgi?id=47148