Hi, Prasanta.
On 11/10/2017 02:43, Prasanta Sadhukhan wrote:
Issue was, when a JLabel with an html text is created, the
GlyphPainter1.getSpan() uses a FontrenderedContext with transform scale 1
and also the obtained width is converted to int and not to float.
Probably this is a root cause of the bug? FontrenderedContext is an
abstraction which encapsulate information about text attributes for some
specific surface such as screen, window, etc. If the label or any other
components will use some FRC for rendering then the same FRC should be
used for font size measurement. So why the scale is 1?
Proposed fix is to use correct transform while calculating the string
width and also use floating point API to get floating point width.
It will apply the screens scale to the FRC even if the component is
located on some other screen.
--
Best regards, Sergey.