<Swing Dev> RFR: 8260687: Inherited font size is smaller than expected when using StyleSheet to add styles [v3]
Stanimir Stamenkov
github.com+1247730+stanio at openjdk.java.net
Thu Feb 11 22:33:38 UTC 2021
On Thu, 11 Feb 2021 22:13:40 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> I do not think the order matters...
It doesn't matter just after the #1759 fix. If you try this with Java 11 or 15 you'll see the problem is present even before that fix. That's the point.
> Does it not? I can't see it has much of difference: visually...
That's the point, what you see visually is what you get from `GlyphView.getFont()` not necessarily what you get from `StyleConstants.getFontSize()` after the document has been completely laid out and the styles to all views computed. The latter depends on the last `CSS.styleSheet` state after the last style gets evaluated. This could be seen again by trying the test by having `<p style="font-size: 100%">` as the first element and Java 11, 15 – the test passes programmatically although visually it obviously failed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2515
More information about the swing-dev
mailing list