//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();
}
}
cb.setRGBColorFill(color.getRed(), color.getGreen(), color.getBlue());
float textHeight = getTextHeight(bf, fontSize, label);