How to create text in a Java android project (libGDX)?

0 like 0 dislike
7 views
So, you need to create a text box in the project under Android, using libGDX library.
Task:

1. To adjust the desired size of the text
2. Change background (font)
3. Color

Before that sat on AS3 + Starling, there is such a thing was carried out via TextFormat, which was to write simply enough.

The Internet is not found the necessary information, although in fact, there must be a million articles with examples of a "child" function - like for me. Found a couple videos where they showed that you need to create a separate "skin" for the text, keeping the font file format .fnt, which also sets size

However, in this case the text is created, but to change the same size you need to do the operation again (to create the .fnt), which in my understanding it looks very silly.

Is it in the same Flash so simple to create text in code, in the same set and the font and background.
And here, at least to create this text, it is necessary to do a million file operations.

So I think that still is something I do not understand, and plain text you can create in an easy way.
by | 7 views

1 Answer

0 like 0 dislike
If you need the text as an element of a graphical interface it:
\rhttps://github.com/libgdx/libgdx/wiki/Scene2d.ui
Display text using the Lablel
\rhttps://github.com/libgdx/libgdx/wiki/Scene2d.ui#label
Or you can directly render https://github.com/libgdx/libgdx/wiki/Bitmap-fonts
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 12, 2019 by selmeg
0 like 0 dislike
1 answer
asked May 10, 2019 by alkolove1
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
32,724 users