In version v2104R2 and higher, it is possible to overwrite the default CJK fonts (see Substitute CJK fonts on mac, Windows and Linux) and specify your own CJK fonts to use.

The API for this feature is through calling a static method on the com.qoppa.pdf.PDFRenderHints class.

public static void setCJKSystemFontName(int fontType, String fontFaceName)
  •    int  fontType – constant defined in PDFRenderHints
  •   String    fontFaceName – font name for specific typeface

Possible values for fontType:

  • JAPANESE_SERIF – Japanese serif typeface (often “Mincho”)
  • JAPANESE_SANSERIF – Japanese sans serif typeface (often “Gothic”)
  • KOREAN_SERIF  – Korean serif typeface (often “Dotum”)
  • KOREAN_SANSERIF – Korean sans serif typeface (often “Batang”)
  • CHINESE_SERIF – Traditional Chinese serif typeface (often “Ming” or “Mincho”)
  • CHINESE_SANSERIF  – Traditional Chinese sans serif typeface (often “Gothic”)
  • CHINESE_SIMPLIFIED – Simplified Chinese typeface

Sample code:

// Tell Qoppa Rendering Engine to substitute IPAexMincho
// for an unembedded Japanese Serif font
PDFRenderHints.setCJKSystemFontName(PDFRenderHints.JAPANESE_SERIF, "IPAexMincho");

The font name passed should either match one of the font names returned by the method below, or else it should be null.

// This is the list of font names available on the machine
  1. If the font name matches a system font family name, then that font will be used to render non-embedded instances of the CJK font type specified.
  2. If the font name is null, then that resets the font for this CJK font type to the default value, which may be none on some systems.
  3. If the font name is any other value, then the call has no affect.