Class Fonts
java.lang.Object
de.gurkenlabs.litiengine.resources.ResourcesContainer<java.awt.Font>
de.gurkenlabs.litiengine.resources.Fonts
public final class Fonts
extends ResourcesContainer<java.awt.Font>Method Summary
Modifier and Type Method Description java.awt.Fontget(java.lang.String name, float size)java.awt.Fontget(java.lang.String name, int style)java.awt.Fontget(java.lang.String name, int style, float size)protected java.awt.Fontload(java.net.URL resourceName)Loads a custom font with the specified name from game's resources.Methods inherited from class de.gurkenlabs.litiengine.resources.ResourcesContainer
add, add, addClearedListener, addContainerListener, clear, contains, contains, contains, count, get, get, get, get, get, get, get, getAlias, getAll, getAsync, getAsync, getResources, remove, remove, removeClearedListener, removeContainerListener, tryGet, tryGet
Method Details
get
public java.awt.Font get(java.lang.String name, float size)get
public java.awt.Font get(java.lang.String name, int style)get
public java.awt.Font get(java.lang.String name, int style, float size)load
protected java.awt.Font load(java.net.URL resourceName)Loads a custom font with the specified name from game's resources. As a fallback, when no font could be found by the specifiedfontName, it tries to get the font from the environment by calling.- Specified by:
loadin classResourcesContainer<java.awt.Font>- Parameters:
resourceName- The name of the font- Returns:
- The loaded font.
- See Also:
Font.createFont(int, java.io.File),Font.getFont(String)
