cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Crystal Reports Java Runtime: Fonts not correctly loaded on Linux

c4u_mkoch
Explorer
0 Likes
30

This is a follow up to https://community.sap.com/t5/technology-q-a/how-to-avoid-nullpointerexception-with-crystal-reports-j...

As of SP30 of SAP Crystal Reports, version for Eclipse the option to define the font directories via SystemFontPath was removed on favor of loading /etc/fonts/fonts.conf

This new mechanism does not work as expected because:
1. fonts.conf can have an include-tag to include additional files (e.g. from conf.d) which is ignored
2. a typical font.conf seems to contain

<dir>/usr/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>

dir prefix="xdg" is handled as directory (seems wrong because it is a relative path)

Also directories are not loaded recursive - but font files are usually in subfolders

> ls -l /usr/share/fonts/ /usr/share/fonts/truetype/
/usr/share/fonts/:
insgesamt 20
drwxr-xr-x 2 root root 4096 Mär  3  2020 cmap
drwxr-xr-x 2 root root 4096 Mär  3  2020 cMap
drwxr-xr-x 7 root root 4096 Nov  1  2020 truetype
drwxr-xr-x 3 root root 4096 Mär  3  2020 type1
drwxr-xr-x 4 root root 4096 Nov  1  2020 X11

/usr/share/fonts/truetype/:
insgesamt 20
drwxr-xr-x 2 root root 4096 Mär  3  2020 dejavu
drwxr-xr-x 2 root root 4096 Mär  3  2020 droid
drwxr-xr-x 2 root root 4096 Nov  1  2020 liberation
drwxr-xr-x 2 root root 4096 Nov  1  2020 msttcorefonts
drwxr-xr-x 2 root root 4096 Mär  3  2020 noto

> ls -l /usr/share/fonts/truetype/msttcorefonts/*.ttf | wc -l
60

 It would be nice if this could be fixed with the next SP.

Accepted Solutions (0)

Answers (0)