Java
- 1 ответ
- 0 вопросов
1
Вклад в тег
BitmapFont font;
public static final String FONT_CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789][_!$%#@|\\/?-+=()*&.;,{}\"´`'<>";
font = TrueTypeFontFactory.createBitmapFont(Gdx.files.internal("font.ttf"), FONT_CHARACTERS, 12.5f, 7.5f, 1.0f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
font.setColor(1f, 0f, 0f, 1f);
batch.begin();
font.draw(font, "This is some text", 10, 10);
batch.end();
I think you'll have to create a BitmapFont (using Heiro, for example) from the OTF or find a TTF version.
createBitmapFont()
и ее параметров, можете почитать в документации к libgdx.