APIdia Launch Partner
Top Fields Constructors Methods
sun.font

public final Class FcFontConfiguration

extends FontConfiguration
Class Inheritance
Imports
java.io.File, .FileInputStream, .FileOutputStream, .IOException, java.net.InetAddress, .UnknownHostException, java.nio.charset.Charset, java.nio.file.Files, java.util.HashMap, .HashSet, .Locale, .Properties, .Scanner, sun.awt.FcFontManager, .FontConfiguration, .FontDescriptor, .SunToolkit, sun.font.FontConfigManager.FcCompFont, .FontConfigManager.FontConfigFont, .FontConfigManager.FontConfigInfo, sun.util.logging.PlatformLogger

Field Summary

Modifier and TypeField and Description
private FontConfigManager.FcCompFont[]
private String
private static final String
fileVersion

Version of the cache file format understood by this code.

Inherited from sun.awt.FontConfiguration:
encodingfontManagerfontNamesinstalledFallbackFontFilesisPropertieslocaleMapNUM_FONTSNUM_STYLESosNameosVersionpreferLocaleFontspreferPropFontspublicFontNamesreorderMapstartupLocalestyleNamestable_awtfontpathsverbose

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
protected FontDescriptor[]
private String
public CompositeFontDescriptor[]
get2DCompositeFontInfo()

Overrides sun.awt.FontConfiguration.get2DCompositeFontInfo.

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

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

Implements abstract sun.awt.FontConfiguration.getEncoding.

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

public String
getExtraFontPath()

Overrides sun.awt.FontConfiguration.getExtraFontPath.

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

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

Implements abstract sun.awt.FontConfiguration.getFallbackFamilyName.

Returns a fallback name for the given font name.

private FontConfigManager.FontConfigFont[]
getFcFontList(FontConfigManager.FcCompFont[] fcFonts, String fontname, int style)

private File
protected String
public String
getFileNameFromPlatformName(String platformName)

Overrides sun.awt.FontConfiguration.getFileNameFromPlatformName.

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.

public int
public String[]
private String
getVersionString(File f)

Gets the OS version string from a Linux release-specific file.

public synchronized boolean
protected void
public boolean
private void
protected void
setOsNameAndVersion()

Overrides sun.awt.FontConfiguration.setOsNameAndVersion.

Sets the OS name and version from environment information.

private static void
private void
Inherited from sun.awt.FontConfiguration:
fontFilesArePresentfoundOsSpecificFilegetAWTFontPathSetgetCompatibilityFamilyNamegetComponentFontIDgetComponentFontIDMotifgetComponentFontNamegetCoreScriptsgetFontConfigurationgetFontDescriptorsgetFontIndexgetFontNamegetInstalledFallbackFontsgetLogicalFontFaceNamegetStringgetStyleIndexgetStyleIndexgetStyleNamegetStyleStringgetVersionhasMonoToPropMapisLogicalFontFaceNameisLogicalFontFaceNameLCisLogicalFontFamilyNameisLogicalFontFamilyNameLCloadBinaryloadPropertiesmakeAWTFontNamemapFileNamesaveBinarysetFontConfigurationwillReorderForStartupLocale

Field Detail

fcCompFontsback to summary
private FontConfigManager.FcCompFont[] fcCompFonts
fcInfoFileNameback to summary
private String fcInfoFileName
fileVersionback to summary
private static final String fileVersion

Version of the cache file format understood by this code. Its part of the file name so that we can rev this at any time, even in a minor JDK update. It is stored as the value of the "version" property. This is distinct from the version of "libfontconfig" that generated the cached results, and which is the "fcversion" property in the file. FontConfiguration.getVersion() also returns a version string, and has meant the version of the fontconfiguration.properties file that was read. Since this class doesn't use such files, then what that really means is whether the methods on this class return values that are compatible with the classes that do directly read from such files. It is a compatible subset of version "1".

Constructor Detail

FcFontConfigurationback to summary
public FcFontConfiguration(SunFontManager fm)
FcFontConfigurationback to summary
public FcFontConfiguration(SunFontManager fm, boolean preferLocaleFonts, boolean preferPropFonts)

Method Detail

buildFontDescriptorsback to summary
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex)

Overrides sun.awt.FontConfiguration.buildFontDescriptors.

Annotations
@Override
extractInfoback to summary
private String extractInfo(String s)
get2DCompositeFontInfoback to summary
public CompositeFontDescriptor[] get2DCompositeFontInfo()

Overrides sun.awt.FontConfiguration.get2DCompositeFontInfo.

Doc from sun.awt.FontConfiguration.get2DCompositeFontInfo.

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

Annotations
@Override
getDefaultFontCharsetback to summary
protected Charset getDefaultFontCharset(String fontName)

Implements abstract sun.awt.FontConfiguration.getDefaultFontCharset.

Annotations
@Override
getEncodingback to summary
protected String getEncoding(String awtFontName, String characterSubsetName)

Implements abstract sun.awt.FontConfiguration.getEncoding.

Doc from sun.awt.FontConfiguration.getEncoding.

Returns the java.io name of the platform character encoding for the given AWT font name and character subset. May return "default" to indicate that getDefaultFontCharset should be called to obtain a charset encoder.

Annotations
@Override
getExtraFontPathback to summary
public String getExtraFontPath()

Overrides sun.awt.FontConfiguration.getExtraFontPath.

Doc from sun.awt.FontConfiguration.getExtraFontPath.

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

Annotations
@Override
getFaceNameFromComponentFontNameback to summary
protected String getFaceNameFromComponentFontName(String componentFontName)

Implements abstract sun.awt.FontConfiguration.getFaceNameFromComponentFontName.

Annotations
@Override
getFallbackFamilyNameback to summary
public String getFallbackFamilyName(String fontName, String defaultFallback)

Implements abstract sun.awt.FontConfiguration.getFallbackFamilyName.

Doc from sun.awt.FontConfiguration.getFallbackFamilyName.

Returns a fallback name for the given font name. For a few known font names, matching logical font names are returned. For all other font names, defaultFallback is returned. defaultFallback differs between AWT and 2D.

Annotations
@Override
getFcFontListback to summary
private FontConfigManager.FontConfigFont[] getFcFontList(FontConfigManager.FcCompFont[] fcFonts, String fontname, int style)
getFcInfoFileback to summary
private File getFcInfoFile()
getFileNameFromComponentFontNameback to summary
protected String getFileNameFromComponentFontName(String componentFontName)

Implements abstract sun.awt.FontConfiguration.getFileNameFromComponentFontName.

Annotations
@Override
getFileNameFromPlatformNameback to summary
public String getFileNameFromPlatformName(String platformName)

Overrides sun.awt.FontConfiguration.getFileNameFromPlatformName.

Doc from sun.awt.FontConfiguration.getFileNameFromPlatformName.

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. The file name returned is just a hint; a null return value doesn't necessarily mean that the font is unavailable, nor does a non-null return value guarantee that the file exists and contains the physical font. The file name can be an absolute or a relative path name.

Annotations
@Override
getNumberCoreFontsback to summary
public int getNumberCoreFonts()

Overrides sun.awt.FontConfiguration.getNumberCoreFonts.

Annotations
@Override
getPlatformFontNamesback to summary
public String[] getPlatformFontNames()

Overrides sun.awt.FontConfiguration.getPlatformFontNames.

Annotations
@Override
getVersionStringback to summary
private String getVersionString(File f)

Gets the OS version string from a Linux release-specific file.

initback to summary
public synchronized boolean init()

Overrides sun.awt.FontConfiguration.init.

Annotations
@Override
initReorderMapback to summary
protected void initReorderMap()

Implements abstract sun.awt.FontConfiguration.initReorderMap.

Annotations
@Override
needToSearchForFileback to summary
public boolean needToSearchForFile(String fileName)

Overrides sun.awt.FontConfiguration.needToSearchForFile.

Annotations
@Override
readFcInfoback to summary
private void readFcInfo()
setOsNameAndVersionback to summary
protected void setOsNameAndVersion()

Overrides sun.awt.FontConfiguration.setOsNameAndVersion.

Sets the OS name and version from environment information.

Annotations
@Override
warningback to summary
private static void warning(String msg)
writeFcInfoback to summary
private void writeFcInfo()