I found that if a run both contains english and other language like chinese,when i use run.getFont(),it will return the font which appears first.for example,“你好 means hello",it will return “宋体” as the font of the run,how can get the english font in this run?
@yuyan The Font
class has several properties for getting fonts for different locales:
- Font.getNameAscii() - Gets the font used for Latin text (characters with character codes from 0 (zero) through 127).
- Font.getNameBi() - Gets the name of the font in a right-to-left language document.
- Font.getNameFarEast() - Gets an East Asian font name.
- Font.getNameOther() - Gets the font used for characters with character codes from 128 through 255.
thanks,it really does work!
1 Like