Where the TooltipWindow gets its scale needs to be configurable. Options should be desktop (so they are always the same size), a specific component or the current behaviour.
The issue is in our app, when you mouse over a component we apply a transform to give it a zoom effect. The tooltip is sized based on the component before the zoom is applied. Then the tooltip repaints once it is created and now the scale of the component under the mouse is different, so the text draws bigger and doesn’t fit in the window that was created.
We have a similar problem in our plugin, where a single component has a transform applied (with an affine transform scale). The tooltip for this component is very small (unreadable).
The fix is straightforward: the juce::Tooltip class needs to lose its getDesktopScaleFactor override. The juce::Component function is already doing the right thing.
Now it works regardless of whether the tooltip is attached to a parent or not. The right position and scale by removing code.