com.mindprod.common11
Class FontFactory

java.lang.Object
  extended by com.mindprod.common11.FontFactory

public class FontFactory
extends java.lang.Object

Modifies Java's logical font mapping.

Since:
2008-08-20
Version:
1.1 2009-04-17 - use Hashtables, add Arrows.
Author:
Roedy Green, Canadian Mind Products

Constructor Summary
FontFactory()
           
 
Method Summary
static java.awt.Font build(java.lang.String fontFamilyName, int style, int size)
          Creates a new Font from the specified name, style and point size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontFactory

public FontFactory()
Method Detail

build

public static java.awt.Font build(java.lang.String fontFamilyName,
                                  int style,
                                  int size)
Creates a new Font from the specified name, style and point size. Like new Font, but modifies the mapping of logical fonts. E.g. Dialog will be translated to Segoe-UI

Parameters:
fontFamilyName - the font name. This can be a font face name or a font family name, and may represent either a logical font or a physical font The family names for logical fonts are: Dialog, DialogInput, Monospaced, Serif, or SansSerif.
style - the style constant for the Font The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC).
size - the point size of the Font
Returns:
corresponding Font, with logical fonts remapped for Windows Vista to new native high res fonts.