diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp index 8caeeb94..a54b02a8 100644 --- a/dgl/src/NanoVG.cpp +++ b/dgl/src/NanoVG.cpp @@ -865,7 +865,7 @@ float NanoVG::textBounds(float x, float y, const char* string, const char* end, float b[4]; const float ret = nvgTextBounds(fContext, x, y, string, end, b); - bounds = Rectangle(b[0], b[1], b[2], b[3]); + bounds = Rectangle(b[0], b[1], b[2] - b[0], b[3] - b[1]); return ret; }