Word wrapping problem in RichTextCellPainter [message #1741000] |
Mon, 22 August 2016 09:59 |
Volker Bier Messages: 7 Registered: August 2016 |
Junior Member |
|
|
Hello,
i am using the RichTextCellPainter with a custom loaded font. When enabling word wrapping, the wrapping is not exact, it is off by a few characters most of the time.
While debugging the RichTextPainter (RTP), it looks like it is still using the default system font (which is Ubuntu in my case) instead of the font that I have set using cellStyle.setAttributeValue(CellStyleAttributes.FONT, font);
Specifically, the RTP creates a temporary gc in line 214 as a copy of the nattable gc. The original has the correct font, the copy does not. Adding tempGC.setFont(gc.getFont()); after the creation of the temp gc makes things work as expected.
Is this a bug in the RTP, or do I have to set the font differently somehow?
Thanks for your help,
Volker
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03057 seconds