[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] FontMetrics missing some usefull functions...
|
- From: Hans Deragon <hans@xxxxxxxxxxx>
- Date: Wed, 23 Apr 2003 10:41:09 -0400
- Newsgroups: eclipse.platform.swt
- Organization: Deragon Informatique inc.
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
Greetings.
I need to figure out how long my Text field should be to contain 10 characters.
Using FontMetric.getAverageCharWidth() is not good enough. I do not want
the average, I want the size of the largest (usually 'm').
Is there some other way I can get the information I am looking for? I want
to get the largest character width, and it would also be nice if I could get
the width of a particular character.
FontMetric.getLargestCharWidth()
FontMetric.getCharWidth(char character)
Maybe I should open a feature request for this.
Sincerely,
Hans Deragon
--
Deragon Informatique inc. Open source:
http://www.deragon.biz http://swtmvcwrapper.sourceforge.net
mailto://hans@xxxxxxxxxxx http://autopoweroff.sourceforge.net