Skip to main content



      Home
Home » Eclipse Projects » NatTable » Word wrapping problem in RichTextCellPainter
Word wrapping problem in RichTextCellPainter [message #1741000] Mon, 22 August 2016 05:59 Go to next message
Eclipse UserFriend
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 10:04 Go to previous messageGo to next message
Eclipse UserFriend
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 01:37 Go to previous messageGo to next message
Eclipse UserFriend
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 01:37 Go to previous message
Eclipse UserFriend
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: Fri Jul 25 10:30:53 EDT 2025

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

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

Back to the top