Placement inputs, all in pixels.
Token height from document.getSize().
Gap between token bottom and nameplate top
(CONFIG.Canvas.objectBorderThickness * 0.75 * uiScale).
Token width from document.getSize().
Token world x (its position.x).
Token world y (its position.y).
World coordinates for the nameplate anchor.
The nameplate uses anchor (0.5, 0), so this
is its top-centre point.
Compute the world-space position of a token's nameplate. Mirrors Foundry's token-local placement (
_refreshSize): horizontally centred under the token, with the top edgeoffsetpixels below the bottom edge of the token.Pure function so it can be unit tested without a canvas.