Class FontUtilities
java.lang.Object
de.gurkenlabs.litiengine.util.FontUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic FontgetFallbackFontIfNecessary(String stringToWrite, float textSize, Font primaryFont, Font fallbackFont) Returns a fallback font if the primary font cannot display the specified string.
-
Method Details
-
getFallbackFontIfNecessary
public static Font getFallbackFontIfNecessary(String stringToWrite, float textSize, Font primaryFont, Font fallbackFont) Returns a fallback font if the primary font cannot display the specified string.- Parameters:
stringToWrite- the string to be displayedtextSize- the size of the textprimaryFont- the primary font to be usedfallbackFont- the fallback font to be used if the primary font cannot display the string- Returns:
- the primary font if it can display the string, otherwise the fallback font
-