List of utility methods to do Font from System
FontRenderContext | getDefaultFrc() get Default Frc if (DEFAULT_FRC == null) { AffineTransform tx; if (GraphicsEnvironment.isHeadless()) { tx = new AffineTransform(); } else { tx = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice() .getDefaultConfiguration().getDefaultTransform(); DEFAULT_FRC = new FontRenderContext(tx, false, false); return DEFAULT_FRC; |
String | getDefaultMapXMLCreatorFontName() Tries to find preferredMapXMLCreatorFontName font or takes the first in the list of available fonts. final String[] availableFontFamilyNames = GraphicsEnvironment.getLocalGraphicsEnvironment() .getAvailableFontFamilyNames(); for (final String fontName : availableFontFamilyNames) { if (fontName.equals(preferredMapXMLCreatorFontName)) { return fontName; return availableFontFamilyNames[0]; ... |
int | getDefaultMonoFontSize() Get size of default monspaced font. return MONOSPACED_FONT.getSize();
|
Font | getDefaultSansSerifFont() Returns the default sans serif font. if (_defaultSansSerifFont == null) { _defaultSansSerifFont = new Font("SansSerif", Font.PLAIN, 12); return _defaultSansSerifFont; |
String[] | getSystemFontNames() get System Font Names return GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
|
Vector | getSystemFonts() Returns the system font names within a collection. GraphicsEnvironment gEnv = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] tempFonts = gEnv.getAllFonts(); char dot = '.'; int dotIndex = 0; char[] fontNameChars = null; String fontName = null; Vector<String> fontNames = new Vector<String>(); for (int i = 0; i < tempFonts.length; i++) { ... |
Map | getSystemTextHints() get System Text Hints if (!systemTextHintsInitialized) { systemTextHints = (Map) Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints"); systemTextHintsInitialized = true; return systemTextHints; |