Package com.inductiveautomation.snap.gfx
Class SnapFontUtils
- java.lang.Object
- 
- com.inductiveautomation.snap.gfx.SnapFontUtils
 
- 
 public class SnapFontUtils extends java.lang.ObjectProvides some utility methods for Fonts.
- 
- 
Constructor SummaryConstructors Constructor Description SnapFontUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static SnapFontgetAltFont(char aChar)Returns an alternate font for given char, if one is found that can display itstatic java.util.List<SnapFont>getAltFonts()Returns the list of suggested alternate fonts.static java.lang.String[]getFamilyNames()Returns a list of all system family names.static java.awt.FontgetFont(java.lang.String aName, float aSize)Returns a Font for a given name and size.static java.lang.StringgetFontNameNormalized(java.lang.String aName)Returns a "cleaned up" or standardized version of the given font name: 1.static java.lang.String[]getFontNames()Returns a list of all system fontnames (excludes any that don't start with capital A-Z).static java.lang.String[]getFontNames(java.lang.String aFamilyName)Returns a list of all font names for a given family name.static java.awt.Font[]getFonts()Returns the array of system fonts.static java.awt.FontguessFont(java.lang.String aName)Returns the system font with the most similar name to the given name.static voidstartFontLoadingInBackground()Starts loading fonts in the background and returns.
 
- 
- 
- 
Method Detail- 
getFontpublic static java.awt.Font getFont(java.lang.String aName, float aSize)Returns a Font for a given name and size.
 - 
getFontspublic static java.awt.Font[] getFonts() Returns the array of system fonts.
 - 
getFontNamespublic static java.lang.String[] getFontNames() Returns a list of all system fontnames (excludes any that don't start with capital A-Z).
 - 
getFamilyNamespublic static java.lang.String[] getFamilyNames() Returns a list of all system family names.
 - 
getFontNamespublic static java.lang.String[] getFontNames(java.lang.String aFamilyName) Returns a list of all font names for a given family name.
 - 
guessFontpublic static java.awt.Font guessFont(java.lang.String aName) Returns the system font with the most similar name to the given name.
 - 
getFontNameNormalizedpublic static java.lang.String getFontNameNormalized(java.lang.String aName) Returns a "cleaned up" or standardized version of the given font name: 1. Remove MT or MS or PS 2. Convert all non alpha numeric characters (essentially just dashes?) to spaces 3. Add space between any adjacent pair of lower-case:upper-case chars
 - 
getAltFontpublic static SnapFont getAltFont(char aChar) Returns an alternate font for given char, if one is found that can display it
 - 
getAltFontspublic static java.util.List<SnapFont> getAltFonts() Returns the list of suggested alternate fonts.
 - 
startFontLoadingInBackgroundpublic static void startFontLoadingInBackground() Starts loading fonts in the background and returns.
 
- 
 
-