public class RoboFont extends AbstractFont
Font.Style| Constructor and Description |
|---|
RoboFont(RoboGraphics graphics,
String name,
Font.Style style,
float size) |
| Modifier and Type | Method and Description |
|---|---|
static RoboFont |
defaultFont()
Returns the font used when no font is configured.
|
String |
iosName() |
static void |
registerVariant(String name,
Font.Style style,
String variantName)
Registers a font for use when a bold, italic or bold italic variant is requested.
|
public RoboFont(RoboGraphics graphics, String name, Font.Style style, float size)
public static void registerVariant(String name, Font.Style style, String variantName)
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.
public static RoboFont defaultFont()
public String iosName()
Copyright © 2015. All Rights Reserved.