text: half space char width

This commit is contained in:
Caleb Connolly 2022-08-06 19:35:04 +01:00
parent 85fc1c0a41
commit cc37eea120
No known key found for this signature in database
GPG key ID: 0583312B195F64B6

View file

@ -1413,7 +1413,7 @@ void nsvgRasterizeText(NSVGrasterizer* r,
shape = shapes[i]; shape = shapes[i];
if (!shape) { if (!shape) {
if (text[i] == ' ') if (text[i] == ' ')
tx += charWidth; tx += charWidth / 2.f;
continue; continue;
} }
if (!(shape->flags & NSVG_FLAGS_VISIBLE)) if (!(shape->flags & NSVG_FLAGS_VISIBLE))