public class RoboFont
extends java.lang.Object
| Constructor and Description |
|---|
RoboFont() |
| Modifier and Type | Method and Description |
|---|---|
static void |
registerVariant(java.lang.String name,
Font.Style style,
java.lang.String variantName)
Registers a font for use when a bold, italic or bold italic variant is requested.
|
public static void registerVariant(java.lang.String name,
Font.Style style,
java.lang.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.
Copyright © 2019. All Rights Reserved.