org.kemet.lf.tools.ihm
Class FontTools

java.lang.Object
  extended by org.kemet.lf.tools.ihm.FontTools

public class FontTools
extends java.lang.Object

Since:
0.4
Author:
fabricemaupin

FontTools : toolbox for font.


Constructor Summary
FontTools()
           
 
Method Summary
static int widthOfCaracter(java.awt.Font font)
           return the width of a caracter for a particular font.
static int widthOfText(java.lang.String text, java.awt.Font font)
           return the width of a text for a particular font.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontTools

public FontTools()
Method Detail

widthOfCaracter

public static int widthOfCaracter(java.awt.Font font)

return the width of a caracter for a particular font.

Parameters:
font - current font
Returns:
width of a caracter
Since:
0.4

widthOfText

public static int widthOfText(java.lang.String text,
                              java.awt.Font font)

return the width of a text for a particular font.

Parameters:
text - current text
font - font of the text
Returns:
width of a text
Since:
0.5


Copyright © 2008 F. MAUPIN. All Rights Reserved.