Microsoft SDK for Java

FontX Class

The FontX Class of the com.ms.awt package creates a font object that defines the font family, font face, style, and size. The FontX class also supports TrueType® fonts.

public class FontX extends FxFont
{
  // Fields
  public static final int EMBEDDED;
  public static final int OUTLINE;
  public static final int STRIKEOUT;
  public static final int UNDERLINE;

  // Constructors
  public FontX();
  public FontX(String name, int style, int size);
  public FontX(String name, int style, int size, boolean bEmbed);
  public FontX(String name, int style, int size, int xFlags);

  // Methods
  public boolean equals(Object obj);
  public static String[] getAttributeList();
  public static String[] getAttributeList(String face);
  public int getFlags();
  public static int getFlagsVal(String face, String attribute);
  public static Font getFont(String face, int style, int size, int flags);
  public static Font getFont(String face, Vector v, int size);
  public static String[] getFontList();
  public static int getStyleVal(String face, String attribute);
  public boolean isTypeable(int language);
  public static boolean matchFace(String face);
  public String toString();
}

With JDK 1.1, fonts are mapped with a font properties file, and you can obtain different fonts by editing this file. However, the Microsoft implementation does not support this type of font association. You can obtain desired fonts with FontX objects; they are created with Win32 font names.

Hierarchy

FxFont 
  |
  +--FontX

© 1999 Microsoft Corporation. All rights reserved. Terms of use.