Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Word wrapping problem in RichTextCellPainter
Word wrapping problem in RichTextCellPainter [message #1741000] Mon, 22 August 2016 09:59 Go to next message
Volker Bier is currently offline Volker BierFriend
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

Re: Word wrapping problem in RichTextCellPainter [message #1741042 is a reply to message #1741000] Mon, 22 August 2016 14:04 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
Sounds like a bug. I would need to check this.

Please create a ticket and maybe directly propose a patch via Gerrit.
Re: Word wrapping problem in RichTextCellPainter [message #1741096 is a reply to message #1741042] Tue, 23 August 2016 05:37 Go to previous messageGo to next message
Volker Bier is currently offline Volker BierFriend
Messages: 7
Registered: August 2016
Junior Member
I filed a bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500098. I have no experience with gerrit and can not access the git company due to our company proxy, so I can not easily propose a patch.
Re: Word wrapping problem in RichTextCellPainter [message #1741097 is a reply to message #1741096] Tue, 23 August 2016 05:37 Go to previous message
Volker Bier is currently offline Volker BierFriend
Messages: 7
Registered: August 2016
Junior Member
Oh sorry, and thanks for your help.
Previous Topic:Using a SelectionLayer and buttons together in a table
Next Topic:Find Text while setting the Scope to Selection, Removing Application Modal
Goto Forum:
  


Current Time: Sat Nov 17 09:48:35 GMT 2018

Powered by FUDForum. Page generated in 0.01685 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top