I am upgrading from OpenJDK-6 to OpenJDK-8 on an embedded platform and have problems with the fonts. We're using the DejaVu fonts. I have created a suitable fontconfig.properties file in the jre/lib directory, and when I list the fonts with java i get the list as follows:
DejaVu Sans
DejaVu Sans Condensed
DejaVu Sans Light
DejaVu Sans Mono
DejaVu Serif
DejaVu Serif Condensed
Dialog
DialogInput
Monospaced
SansSerif
Serif
The application in question is an AWT application - because it is running under PPC32 using the Zero JVM (haven't installed JamVM yet), but shows artefacts when rendering the fonts on the screen.
The issue looks like it is changing the background as well... The embedded system is running x11 7.7, with freetype, fontconfig, dejavu fonts.
How can I get the fonts to render correctly inside Java? I tried XFD, and that doesn't show any artefacts at all...
fontconfig.properties:
#
# Version
version=1
# Component Font Mappings
serif.plain.latin-1=DejaVu Serif
serif.bold.latin-1=DejaVu Serif Bold
serif.italic.latin-1=DejaVu Serif Oblique
serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
sansserif.plain.latin-1=DejaVu Sans
sansserif.bold.latin-1=DejaVu Sans Bold
sansserif.italic.latin-1=DejaVu Sans Oblique
sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
monospaced.plain.latin-1=DejaVu Sans Mono
monospaced.bold.latin-1=DejaVu Sans Mono Bold
monospaced.italic.latin-1=DejaVu Sans Mono Oblique
monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
dialog.plain.latin-1=DejaVu Sans
dialog.bold.latin-1=DejaVu Sans Bold
dialog.italic.latin-1=DejaVu Sans Oblique
dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
dialoginput.plain.latin-1=DejaVu Sans Mono
dialoginput.bold.latin-1=DejaVu Sans Mono Bold
dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
#
# Search Sequences
sequence.allfonts=latin-1
# Font File Names
filename.DejaVu_Sans=/usr/share/fonts/X11/TTF/DejaVuSans.ttf
filename.DejaVu_Sans_Bold=/usr/share/fonts/X11/TTF/DejaVuSans-Bold.ttf
filename.DejaVu_Sans_Oblique=/usr/share/fonts/X11/TTF/DejaVuSans- Oblique.ttf
filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/X11/TTF/DejaVuSans- BoldOblique.ttf
filename.DejaVu_Sans_Mono=/usr/share/fonts/X11/TTF/DejaVuSansMono.ttf
filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/X11/TTF/DejaVuSansMono- Bold.ttf
filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/X11/TTF/DejaVuSansMono-Oblique.ttf
filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/X11/TTF/DejaVuSansMono-BoldOblique.ttf
filename.DejaVu_Serif=/usr/share/fonts/X11/TTF/DejaVuSerif.ttf
filename.DejaVu_Serif_Bold=/usr/share/fonts/X11/TTF/DejaVuSerif-Bold.ttf
filename.DejaVu_Serif_Oblique=/usr/share/fonts/X11/TTF/DejaVuSerif- Oblique.ttf
filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/X11/TTF/DejaVuSerif- BoldOblique.ttf
# AWT X11 font paths
awtfontpath.latin-1=/usr/share/fonts/X11/TTF/
Font directories:
ls /usr/share/fonts/ -lR
/usr/share/fonts/:
drwxr-xr-x 3 root root 62 Oct 30 21:59 X11
-rw-r--r-- 1 root root 2 Oct 30 21:59 fonts.dir
-rw-r--r-- 1 root root 2 Oct 30 21:59 fonts.scale
/usr/share/fonts/X11:
drwxr-xr-x 2 root root 741 Oct 30 21:50 TTF
-rw-r--r-- 1 root root 2 Oct 30 21:59 fonts.dir
-rw-r--r-- 1 root root 2 Oct 30 21:59 fonts.scale
/usr/share/fonts/X11/TTF:
-rw-r--r-- 1 root root 672300 Oct 30 21:50 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 611212 Oct 30 21:50 DejaVuSans-BoldOblique.ttf
-rw-r--r-- 1 root root 345208 Oct 30 21:50 DejaVuSans-ExtraLight.ttf
-rw-r--r-- 1 root root 611556 Oct 30 21:50 DejaVuSans-Oblique.ttf
-rw-r--r-- 1 root root 720012 Oct 30 21:50 DejaVuSans.ttf
-rw-r--r-- 1 root root 631992 Oct 30 21:50 DejaVuSansCondensed-Bold.ttf
-rw-r--r-- 1 root root 580168 Oct 30 21:50 DejaVuSansCondensed-BoldOblique.ttf
-rw-r--r-- 1 root root 576004 Oct 30 21:50 DejaVuSansCondensed-Oblique.ttf
-rw-r--r-- 1 root root 643852 Oct 30 21:50 DejaVuSansCondensed.ttf
-rw-r--r-- 1 root root 313856 Oct 30 21:50 DejaVuSansMono-Bold.ttf
-rw-r--r-- 1 root root 235848 Oct 30 21:50 DejaVuSansMono-BoldOblique.ttf
-rw-r--r-- 1 root root 241972 Oct 30 21:50 DejaVuSansMono-Oblique.ttf
-rw-r--r-- 1 root root 333636 Oct 30 21:50 DejaVuSansMono.ttf
-rw-r--r-- 1 root root 341072 Oct 30 21:50 DejaVuSerif-Bold.ttf
-rw-r--r-- 1 root root 332036 Oct 30 21:50 DejaVuSerif-BoldItalic.ttf
-rw-r--r-- 1 root root 338776 Oct 30 21:50 DejaVuSerif-Italic.ttf
-rw-r--r-- 1 root root 363200 Oct 30 21:50 DejaVuSerif.ttf
-rw-r--r-- 1 root root 316440 Oct 30 21:50 DejaVuSerifCondensed-Bold.ttf
-rw-r--r-- 1 root root 331128 Oct 30 21:50 DejaVuSerifCondensed-BoldItalic.ttf
-rw-r--r-- 1 root root 338140 Oct 30 21:50 DejaVuSerifCondensed-Italic.ttf
-rw-r--r-- 1 root root 330012 Oct 30 21:50 DejaVuSerifCondensed.ttf
-rw-r--r-- 1 root root 43905 Oct 30 21:59 fonts.dir
-rw-r--r-- 1 root root 43905 Oct 30 21:59 fonts.scale
XLSFONTS:
-misc-fixed-medium-r-semicondensed--0-0-75-75-c-0-iso8859-1
-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1
-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
6x13
cursor
fixed
I'm sure I'm missing something, but haven't been able to find what...