float textWidth = getTextWidth(bf, fontSize, label);
float textHeight = getTextHeight(bf, fontSize, label);
//A height of just textHeight seems to be half the text height sometimes
//BaseFont getAscentPoint and getDescentPoint may be not very precise
cb.rectangle(x - textWidth / 2f - outlineSize / 2f, -y - outlineSize / 2f - textHeight, textWidth + outlineSize, textHeight * 2f + outlineSize);
cb.fill();
if (boxColor.getAlpha() < 255) {
cb.restoreState();
}