Package com.inductiveautomation.snap.gfx
Class SnapFontUtils
java.lang.Object
com.inductiveautomation.snap.gfx.SnapFontUtils
Provides some utility methods for Fonts.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic SnapFontgetAltFont(char aChar) Returns an alternate font for given char, if one is found that can display itReturns the list of suggested alternate fonts.static String[]Returns a list of all system family names.static FontReturns a Font for a given name and size.static StringgetFontNameNormalized(String aName) Returns a "cleaned up" or standardized version of the given font name: 1.static String[]Returns a list of all system fontnames (excludes any that don't start with capital A-Z).static String[]getFontNames(String aFamilyName) Returns a list of all font names for a given family name.static Font[]getFonts()Returns the array of system fonts.static FontReturns the system font with the most similar name to the given name.static voidStarts loading fonts in the background and returns.
- 
Constructor Details- 
SnapFontUtilspublic SnapFontUtils()
 
- 
- 
Method Details- 
getFontReturns a Font for a given name and size.
- 
getFontsReturns the array of system fonts.
- 
getFontNamesReturns a list of all system fontnames (excludes any that don't start with capital A-Z).
- 
getFamilyNamesReturns a list of all system family names.
- 
getFontNamesReturns a list of all font names for a given family name.
- 
guessFontReturns the system font with the most similar name to the given name.
- 
getFontNameNormalizedReturns 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
- 
getAltFontReturns an alternate font for given char, if one is found that can display it
- 
getAltFontsReturns the list of suggested alternate fonts.
- 
startFontLoadingInBackgroundpublic static void startFontLoadingInBackground()Starts loading fonts in the background and returns.
 
-