flyingsaucerproject / flyingsaucer

XML/XHTML and CSS 2.1 renderer in pure Java
Other
1.97k stars 553 forks source link

#184 avoid loading CJK fonts by default #204

Closed asolntsev closed 11 months ago

asolntsev commented 11 months ago
  1. extracted CJK-specific part from ITextFontResolver to a subclass CJKFontResolver
  2. Users can pass it to ITextRenderer, e.g. new ITextRenderer(new CJKFontResolver())

P.S. In fact, there is no more need to exclude CJK fonts after PR https://github.com/LibrePDF/OpenPDF/pull/955 gets merged in OpenPDF. This PR will fix loading speed of CJK fonts.

But anyway, I decided to make CJK fonts optional because they also consume some amount of memory (and probably not needed for most customers).