Hello Jules,
I was trying to get the width of a tab character and I discovered this strange (?) behaviour. I will use the TextLayout method, of course, but could you please tell me what is happening here that I do not understand?
Font f(17);
int indent;
indent = f.getStringWidth("\t");
// here indent is 0
GlyphArrangement ga;
ga.addLineOfText(f, "\t", 0.0f, 0.0f);
Rectangle<float> r = ga.getBoundingBox(0, 1, true);
indent = roundToInt(r.getWidth());
// here indent is 0
TextLayout tl;
AttributedString as;
as.append("\t", f);
tl.createLayout(as, 100);
indent = tl.getWidth();
// here indent is 28
