Calling Shape's bounds function implicitly assumes that l, b, t and r values should be properly initialized. This is not obvious, and could lead to the incorrect bounding boxes.
For example, I was default initializing this values with zero, while actual frame was above zero, and this resulted with bbox like {0, 0, r, t} rather than {l, b, r, t} (where l, t, r, b are some concrete values).
Calling Shape's
bounds
function implicitly assumes thatl, b, t and r
values should be properly initialized. This is not obvious, and could lead to the incorrect bounding boxes.For example, I was default initializing this values with zero, while actual frame was above zero, and this resulted with bbox like {0, 0, r, t} rather than {l, b, r, t} (where l, t, r, b are some concrete values).
I've created PR to fix this: https://github.com/Chlumsky/msdfgen/pull/90