Package com.inductiveautomation.rm.text
Class RMFontUtils
java.lang.Object
com.inductiveautomation.rm.text.RMFontUtils
Provides some utility methods for Fonts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Returns whether two fonts are equal.static RMFont
getAltFont
(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 Font
Returns a Font for a given name and size.static String
getFontNameNormalized
(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 Font
Returns the system font with the most similar name to the given name.static void
Starts loading fonts in the background and returns.
-
Constructor Details
-
RMFontUtils
public RMFontUtils()
-
-
Method Details
-
getFont
Returns a Font for a given name and size. -
getFonts
Returns the array of system fonts. -
getFontNames
Returns a list of all system fontnames (excludes any that don't start with capital A-Z). -
getFamilyNames
Returns a list of all system family names. -
getFontNames
Returns a list of all font names for a given family name. -
guessFont
Returns the system font with the most similar name to the given name. -
getFontNameNormalized
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 -
getAltFont
Returns an alternate font for given char, if one is found that can display it -
getAltFonts
Returns the list of suggested alternate fonts. -
equals
Returns whether two fonts are equal. -
startFontLoadingInBackground
public static void startFontLoadingInBackground()Starts loading fonts in the background and returns.
-