What does parameter targetWidth exactly means here and what it has to do with wrap parameter?
public GlyphLayout (BitmapFont font, CharSequence str, Color color, float targetWidth, int halign, boolean wrap) {
setText(font, str, color, targetWidth, halign, wrap);
}
From doc :
targetWidth : The width used for alignment, line wrapping, and truncation. May be zero if those features are not used.
wrap : If true then (a word or unit of text) to be carried over to a new line automatically as the margin is reached, or to fit around embedded features.
If false, the text will only wrap where it contains newlines (\n).
EDIT
Test code : Practical demonstration, how targetWidth and wrap works in
GlyphLayoutconstructor.Output :