Package playn.robovm
Class RoboFont
java.lang.Object
playn.robovm.RoboFont
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidregisterVariant(String name, Font.Style style, String variantName) Registers a font for use when a bold, italic or bold italic variant is requested.
-
Constructor Details
-
RoboFont
public RoboFont()
-
-
Method Details
-
registerVariant
Registers a font for use when a bold, italic or bold italic variant is requested. iOS does not programmatically generate bold, italic and bold italic variants of fonts. Instead it uses the actual bold, italic or bold italic variant of the font provided by the original designer.The built-in iOS fonts (Helvetica, Courier) have already had their variants mapped, but if you add custom fonts to your game, you will need to register variants for the bold, italic or bold italic versions if you intend to make use of them.
Alternatively, you can simply request a font variant by name (e.g.
graphics().createFont("Arial Bold Italic", Font.Style.PLAIN, 16)) to use a specific font variant directly. This variant mapping process exists only to simplify cross-platform development.
-