Browse Source

Fix for issue #100

- fixed glyph position bounds for whitespace
shared-context
Mikko Mononen 11 years ago
parent
commit
f0994aee92
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/nanovg.c

+ 2
- 2
src/nanovg.c View File

@@ -2239,8 +2239,8 @@ int nvgTextGlyphPositions(struct NVGcontext* ctx, float x, float y, const char*
while (fonsTextIterNext(ctx->fs, &iter, &q)) {
positions[npos].str = iter.str;
positions[npos].x = iter.x * invscale;
positions[npos].minx = q.x0 * invscale;
positions[npos].maxx = q.x1 * invscale;
positions[npos].minx = nvg__minf(iter.x, q.x0) * invscale;
positions[npos].maxx = nvg__maxf(iter.nextx, q.x1) * invscale;
npos++;
if (npos >= maxPositions)
break;


Loading…
Cancel
Save