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 SummaryNested ClassesModifier and TypeInterfaceDescription- static interfaceResolver interface to get font information from a component.
- Method SummaryModifier and TypeMethodDescription- doubleGets the font average character width.- double- getEM()Gets the EM size.- double- getEX()Gets the EX size.Gets the font family.- doubleGets the font height.- doubleGets the input character width used in calculations of HTML elements that are "input" tag based.Gets the letter spacing as in CSS.Gets the line height as in CSS.- double- getPT()Gets the PT size.- getSize()Gets the font size with unit as in CSS.- int- getStringWidth- (KString text) Gets the string width of the specified unwrapped string.- getStyle()Gets the font style as in CSS.Gets the font weight as in CSS.
- Method Details- getFamilyString getFamily()Gets the font family.- Returns:
- The family name, null for default.
 
- getSizeString getSize()Gets the font size with unit as in CSS.- Returns:
- e.g. 12px, 110% or 14pt, null for default.
 
- getWeightString getWeight()Gets the font weight as in CSS.- Returns:
- e.g. bold, thin or 800, null for default.
 
- getStyleString getStyle()Gets the font style as in CSS.- Returns:
- e.g. italic or oblique, null for default.
 
- getLineHeightString getLineHeight()Gets the line height as in CSS.- Returns:
- Line height, null for default.
 
- getLetterSpacingString getLetterSpacing()Gets the letter spacing as in CSS.- Returns:
- Letter spacing, null for default.
 
- getHeightdouble getHeight()Gets the font height.- Returns:
- The font height.
 
- getAverageWidthdouble getAverageWidth()Gets the font average character width.- Returns:
- The average width.
 
- getEMdouble getEM()Gets the EM size.- Returns:
- EM size.
 
- getEXdouble getEX()Gets the EX size.- Returns:
- EX size.
 
- getPTdouble getPT()Gets the PT size.- Returns:
- The point size.
 
- getInputCharWidthdouble getInputCharWidth()Gets the input character width used in calculations of HTML elements that are "input" tag based.- Returns:
- The input character width.
 
- getStringWidthGets 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.