Package com.iizix
Interface IFontInfo
- All Known Implementing Classes:
FontInfo
public interface IFontInfo
Interface for the font information class for the UI. The values are the styles that govern the font information and contains the font family, weight, style and line height.- Author:
- Christopher Mindus
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IFontInfo.Resolver
Resolver interface to get font information from a component.
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getAverageWidth()
Gets the font average character width.double
getEM()
Gets the EM size.double
getEX()
Gets the EX size.java.lang.String
getFamily()
Gets the font family.double
getHeight()
Gets the font height.double
getInputCharWidth()
Gets the input character width used in calculations of HTML elements that are "input" tag based.java.lang.String
getLetterSpacing()
Gets the letter spacing as in CSS.java.lang.String
getLineHeight()
Gets the line height as in CSS.double
getPT()
Gets the PT size.java.lang.String
getSize()
Gets the font size with unit as in CSS.int
getStringWidth(KString text)
Gets the string width of the specified unwrapped string.java.lang.String
getStyle()
Gets the font style as in CSS.java.lang.String
getWeight()
Gets the font weight as in CSS.
Method Detail
getFamily
java.lang.String getFamily()
Gets the font family.- Returns:
- The family name, null for default.
getSize
java.lang.String getSize()
Gets the font size with unit as in CSS.- Returns:
- e.g. 12px, 110% or 14pt, null for default.
getWeight
java.lang.String getWeight()
Gets the font weight as in CSS.- Returns:
- e.g. bold, thin or 800, null for default.
getStyle
java.lang.String getStyle()
Gets the font style as in CSS.- Returns:
- e.g. italic or oblique, null for default.
getLineHeight
java.lang.String getLineHeight()
Gets the line height as in CSS.- Returns:
- Line height, null for default.
getLetterSpacing
java.lang.String getLetterSpacing()
Gets the letter spacing as in CSS.- Returns:
- Letter spacing, null for default.
getHeight
double getHeight()
Gets the font height.- Returns:
- The font height.
getAverageWidth
double getAverageWidth()
Gets the font average character width.- Returns:
- The average width.
getEM
double getEM()
Gets the EM size.- Returns:
- EM size.
getEX
double getEX()
Gets the EX size.- Returns:
- EX size.
getPT
double getPT()
Gets the PT size.- Returns:
- The point size.
getInputCharWidth
double getInputCharWidth()
Gets the input character width used in calculations of HTML elements that are "input" tag based.- Returns:
- The input character width.
getStringWidth
int getStringWidth(KString text)
Gets the string width of the specified unwrapped string. This method requires a call to JavaScript in the (IE) browser and inter-thread communication and should be used with care.- Parameters:
text
- The text to measure.- Returns:
- The width in pixels in the current font.