[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Get advance width of a String in a Font.

David wrote:
Thanks for your help.

In fact, to get the size, I create a StyledText with the specific font, and I set the text with my specific String. Then, I get its size, and I dispose the StyledText.

Regards,
David.


If performance starts to suffer I recommend following Eric's approach. What you're doing is extremely heavyweight for such a simple operation.


Matthew