When a lot of fonts are installed on a target Linux system, rendering of some characters leads to ArrayIndexOutOfBoundsException.
To reproduce the issue, run the attached simple program after installing texlive package.
Expected result - is that the program runs normally.
Actual result - exception is thrown.
To install texlive:
* On OpenSuSE 13.2 it's enough to install texlive package from distribution's repository.
* On SuSE Linux Enterprise Server 12:
- download installer from https://www.tug.org/texlive/acquire-netinstall.html
- run install-tl script, change target installation directory TEXDIR to ~/texlive, complete installation
- create file ~/.fonts.conf with the following contents:
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
- run 'fc-cache -f' to update fontconfig caches
- to verify the procedure, run 'fc-list | grep texlive'. The command should produce non-empty output.
The issue is reproduced with latest java version:
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
Additional technical information:
The issue will occur when the number of physical fonts discovered using libfontconfig for a certain logical font is larger than 128.
The only known workaround is decreasing the number of fonts installed in the system. Avoiding the usage of logical fonts in application would also help but it's not easy to achieve.