[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] FontMetrics missing some usefull functions...

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