<Swing Dev> [13] RFR JDK-8214702:Wrong text position for whitespaced string in printing Swing text
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Jan 24 17:33:51 UTC 2019
Hi, Prasanta.
On 24/01/2019 02:18, Prasanta Sadhukhan wrote:
> Proposed fix is to check if we need text layouting for printing too as it is done for swing text drawing on console. If we need text layouting, then only use textlayout justification.
For swing components we skip textlayout by default because of performance reason(when we know that it should be safe to do), are you sure that it is safe in your case? Will the text scales in the same way as the components on which it drawn?
BTW the new codepath missed the call:
g2d.setColor(((PrintColorUIResource)col).getPrintColor());
--
Best regards, Sergey.
More information about the swing-dev
mailing list