NPE in Loading primary font factory failed

Kevin Rushforth kevin.rushforth at
Fri Feb 19 15:54:03 UTC 2016

Another thing that might help diagnose which library has the problem is 
to run with "java -Djavafx.verbose=true ..." -- that option will print 
each native library as it is being loaded and print the exception 
message if one fails.

-- Kevin

Kevin Rushforth wrote:
> Do you have the pango and freetype libraries installed on your 
> platform? One thing to check is whether any dependent libraries are 
> missing for the following .so files:
>    ldd
>    ldd
>    ldd
> -- Kevin
> Maurice wrote:
>> I'm building a Yocto Embedded Linux image for the ARM based Udoo 
>> Board Quad. At the moment the build is good enough that JavaFX seems 
>> to see the Vivante GPU, but my small test program fails with a 
>> NullPointerException:
>>     at 
>> com.sun.javafx.font.PrismFontLoader.font(
>>     at javafx.scene.text.Font.font(
>>     at javafx.scene.text.Font.font(
>>     at com.cuhka.Sample.start(
>> I tried several steps from the OpenJFX Font Setup 
>> <> page, I 
>> checked the presence of the ${java.home}/lib/fonts folder and it does 
>> exist. Running the program with -Dprism.debugfonts=true shows some 
>> error:
>> Loading FontFactory com.sun.javafx.font.freetype.FTFactory
>> Subpixel: enabled
>> Loading font factory failed com.sun.javafx.font.freetype.FTFactory
>> Loading font factory failed com.sun.javafx.font.t2k.T2KFactory
>> *** Loading primary font factory failed. ***
>> *** Fallbacking to com.sun.javafx.font.t2k.T2KFactory ***
>> What should be added to the platform for this to be fixed?
>> Maurice.

More information about the openjfx-dev mailing list