APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.awt

public abstract Class FontConfiguration

extends Object
Class Inheritance
Known Direct Subclasses
sun.font.FcFontConfiguration, sun.font.MFontConfiguration
Imports
java.awt.Font, java.io.DataInputStream, .DataOutputStream, .File, .FileInputStream, .InputStream, .IOException, .OutputStream, java.nio.charset.Charset, .CharsetEncoder, java.util.Arrays, .HashMap, .HashSet, .Hashtable, .Locale, .Map.Entry, .Properties, .Set, .Vector, sun.font.CompositeFontDescriptor, .SunFontManager, .FontUtilities, sun.util.logging.PlatformLogger

Provides the definitions of the five logical fonts: Serif, SansSerif, Monospaced, Dialog, and DialogInput. The necessary information is obtained from fontconfig files.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private String
private Hashtable<String, Charset>
private int[]
private int[][][]
private short[][][]
private String[]
pack-priv HashSet<String>
private Set<Short>
private static final int[]
private static final short[]
private static final String[]
protected static String
pack-priv HashMap<String, Boolean>
private Set<Short>
pack-priv HashMap<String, String>
private static FontConfiguration
private static final String
private File
private FontDescriptor[][][]
protected SunFontManager
protected static final String[]
private boolean
private static short[]
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private boolean
private short
private String
private Locale
protected static String[]
protected static boolean
private String
protected static Hashtable<String, String>
private static PlatformLogger
protected static final int
protected static final int
private int
protected static String
protected static String
protected boolean
protected boolean
protected static final String[]
protected HashMap<String, Object>
private HashMap<String, Short>
protected static Locale
private static String[]
private static short
private static short[]
private static StringBuilder
protected static final String[]
private static short[]
protected static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static short[]
private static char[]
private static final String
public static boolean

Constructor Summary

AccessConstructor and Description
public
public
FontConfiguration(SunFontManager fm, boolean preferLocaleFonts, boolean preferPropFonts)

Method Summary

Modifier and TypeMethod and Description
protected FontDescriptor[]
buildFontDescriptors(int fontIndex, int styleIndex)

private static boolean
contains(short[] IDs, short id, int limit)

private static void
dump()

private void
private File
private File
public boolean
public boolean
public CompositeFontDescriptor[]
get2DCompositeFontInfo()

Returns an array of composite font descriptors for all logical font faces.

private static int
getArrayIndex(String[] names, String name)

public HashSet<String>
protected String
getCompatibilityFamilyName(String fontName)

Returns the 1.1 equivalent for some old 1.0 font family names for which we need to maintain compatibility in some configurations.

private static short
getComponentFileID(short nameID)

private static String
protected static short
getComponentFontID(short scriptID, int fontIndex, int styleIndex)

protected static short
getComponentFontIDMotif(short scriptID, int fontIndex, int styleIndex)

protected static String
protected short[]
getCoreScripts(int fontIndex)

protected abstract Charset
protected abstract String
getEncoding(String awtFontName, String characterSubsetName)

Returns the java.io name of the platform character encoding for the given AWT font name and character subset.

private static int[]
getExclusionRanges(short scriptID)

public String
getExtraFontPath()

Returns a configuration specific path to be appended to the font search path.

protected abstract String
public abstract String
getFallbackFamilyName(String fontName, String defaultFallback)

Returns a fallback name for the given font name.

private static short[]
protected abstract String
public String
getFileNameFromPlatformName(String platformName)

Returns a file name for the physical font represented by this platform font name, if the font configuration has such information available, or null if the information is unavailable.

private CharsetEncoder
getFontCharsetEncoder(final String charsetName, String fontName)

protected static FontConfiguration
public FontDescriptor[]
getFontDescriptors(String fontName, int style)

Returns FontDescriptors describing the physical fonts used for the given logical font name and style.

private FontDescriptor[]
getFontDescriptors(int fontIndex, int styleIndex)

protected static int
getFontIndex(String fontName)

protected static String
getFontName(int fontIndex)

private short
protected void
public static String
getLogicalFontFaceName(String familyName, int style)

Returns the font face name for the given logical font family name and style.

public int
public String[]
private static Object
private static String
getScriptName(short scriptID)

private static short[]
getShortArray(short shortArrayID)

private static short
getShortArrayID(short[] sa)

protected static String
getString(short stringID)

private static short
protected static int
getStyleIndex(String styleName)

protected static int
getStyleIndex(int style)

protected static String
getStyleName(int styleIndex)

public static String
getStyleString(int style)

Returns the string typically used in properties files for the given style.

public String
public static boolean
public synchronized boolean
init()

private void
private void
initFontConfig()

set initLocale, initEncoding and initELC for this FontConfig object currently we just simply use the startup locale and encoding

protected abstract void
private static boolean
isEmpty(short[] a)

public static boolean
isLogicalFontFaceName(String fontName)

Checks whether the given font face name is a valid logical font name.

public static boolean
isLogicalFontFaceNameLC(String fontName)

Checks whether the given font face name is a valid logical font name.

public static boolean
isLogicalFontFamilyName(String fontName)

Checks whether the given font family name is a valid logical font name.

public static boolean
isLogicalFontFamilyNameLC(String fontName)

Checks whether the given font family name is a valid logical font name.

private static boolean
isLogicalFontStyleName(String styleName)

Checks whether the given style name is a valid logical font style name.

public static void
public static void
protected String
makeAWTFontName(String platformFontName, String characterSubsetName)

Returns the AWT font name for the given platform font name and character subset.

protected String
mapFileName(String fileName)

Maps a file name given in the font configuration file to a format appropriate for the platform.

public boolean
private static void
printTable(short[] list, int start)

private void
private static short[]
private short
remapLocaleMap(int fontIndex, int styleIndex, short scriptID, short fontID)

private short
remapProportional(int fontIndex, short id)

private void
private static void
sanityCheck()

Checks consistencies of complied fontconfig data.

public static void
private void
protected void
protected void
setOsNameAndVersion()

Fills in this instance's osVersion and osName members.

private void
shuffle(String[] seq, int src, int dst)

private static Vector<String>
private static short[]
public static boolean
private static void
writeShortTable(DataOutputStream out, short[] data)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait