Class FontMeasurer
- java.lang.Object
-
- org.stathissideris.ascii2image.graphics.FontMeasurer
-
public class FontMeasurer extends Object
- Author:
- Efstathios Sideris
-
-
Constructor Summary
Constructors Constructor Description FontMeasurer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAscent(Font font)
Rectangle2D
getBoundsFor(String str, Font font)
Font
getFontFor(int pixelHeight)
Font
getFontFor(int pixelHeight, FontRenderContext frc)
Font
getFontFor(int maxWidth, String string)
int
getHeightFor(String str, int pixelHeight)
int
getHeightFor(String str, Font font)
int
getWidthFor(String str, int pixelHeight)
int
getWidthFor(String str, Font font)
int
getZHeight(Font font)
static FontMeasurer
instance()
static void
main(String[] args)
-
-
-
Method Detail
-
getWidthFor
public int getWidthFor(String str, int pixelHeight)
-
getHeightFor
public int getHeightFor(String str, int pixelHeight)
-
getBoundsFor
public Rectangle2D getBoundsFor(String str, Font font)
-
getFontFor
public Font getFontFor(int pixelHeight)
-
getAscent
public int getAscent(Font font)
-
getZHeight
public int getZHeight(Font font)
-
getFontFor
public Font getFontFor(int pixelHeight, FontRenderContext frc)
-
instance
public static FontMeasurer instance()
-
main
public static void main(String[] args)
-
-