diff --git a/blendish.h b/blendish.h index ae67238..81b6f1d 100644 --- a/blendish.h +++ b/blendish.h @@ -1907,7 +1907,9 @@ float bndLabelWidth(NVGcontext *ctx, int iconid, const char *label) { if (label && (bnd_font >= 0)) { nvgFontFaceId(ctx, bnd_font); nvgFontSize(ctx, BND_LABEL_FONT_SIZE); - w += nvgTextBounds(ctx, 1, 1, label, NULL, NULL); + float bounds[4]; + nvgTextBoxBounds(ctx, 1, 1, INFINITY, label, NULL, bounds); + w += bounds[2]; } return w; }