Failure to find any font (probably on Embedded)

Stephen F Northover steve.x.northover at
Wed Feb 12 13:57:36 PST 2014

Embedding URL's in code ... a recipe for stale URL's.  I suppose that we 
put URL's in JavaDoc though.


On 2014-02-12 1:53 PM, Kevin Rushforth wrote:
> A more informative message and an earlier detection both sound good. 
> Not sure about the pointer to the Wiki page, though. We haven't done 
> that in the past that I am aware of. If we do want to go down that 
> path, I would suggest a pointer to a single, "well-known" support page 
> that could describe various end-user configuration issues that we 
> might want to document.
> -- Kevin
> David Hill wrote:
>> I am chasing a edge case that probably only happens in certain 
>> Embedded configurations. If we don't find *any* fonts, then we 
>> quietly fail and blame it on CSS :-)
>> I say blame it on CSS because the resulting hard failure is:
>> Exception in thread "JavaFX Application Thread" 
>> java.lang.NoClassDefFoundError: Could not initialize class 
>> javafx.scene.CssStyleHelper
>> This is because CSS needs a font for various calculations.
>> With Embedded, if libfontconfig is not present (or improperly 
>> configured) you will not find any fonts.
>> I would like thoughts on my putting a more informative error message 
>> out, and making zero fonts an earlier hard failure.
>> What I would really like to do is to be able to put a URL to a Fonts 
>> wiki page (like: 
>> but not 
>> sure how well that would stand up to the test of time.
>> The code point in FontConfigManager is:
>>         if (anyFont == null) {
>>             if (debugFonts) {
>>                 System.err.println("Fontconfig returned no fonts at 
>> all.");
>>             }
>>             fontConfigFailed = true;
>>             return;

More information about the openjfx-dev mailing list