Top Fields Constructors Methods
com.sun.javafx.font

public Class PrismFontLoader

extends FontLoader
Class Inheritance
Imports
com.sun.javafx.scene.text.FontHelper, javafx.scene.text.*, com.sun.javafx.tk.*, java.lang.reflect.Method, java.net.URL, java.io.InputStream, java.util.Arrays, .Enumeration, .List, .Properties

Field Summary

Modifier and TypeField and Description
private boolean
embeddedFontsLoaded

Flag to keep track whether the fontCache map has been initialized with the embedded fonts.

pack-priv FontFactory
private static PrismFontLoader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Font
private Font[]
public Font
font(String
The family of the font
family
,
FontWeight
The weight of the font
weight
,
FontPosture
The posture or posture of the font
posture
,
float
The point size of the font. This can be a fractional value
size
)

Implements abstract com.sun.javafx.tk.FontLoader.font.

Searches for an appropriate font based on the font family name and weight and posture style.

public float
getCharWidth(char ch, Font font)

Implements abstract com.sun.javafx.tk.FontLoader.getCharWidth.

public List<String>
getFamilies()

Implements abstract com.sun.javafx.tk.FontLoader.getFamilies.

Gets all the font families installed on the user's system, including any embedded fonts or SDK fonts.

private FontFactory
public FontMetrics
public List<String>
getFontNames()

Implements abstract com.sun.javafx.tk.FontLoader.getFontNames.

Gets the names of all fonts that are installed on the users system, including any embedded fonts and SDK fonts.

public List<String>
getFontNames(String family)

Implements abstract com.sun.javafx.tk.FontLoader.getFontNames.

Gets the names of all fonts in the specified font family that are installed on the users system, including any embedded fonts and SDK fonts.

public static PrismFontLoader
public float
pack-priv Properties
private void
public Font[]
loadFont(InputStream in, double size, boolean loadAll)

Implements abstract com.sun.javafx.tk.FontLoader.loadFont.

public Font[]
loadFont(String path, double size, boolean loadAll)

Implements abstract com.sun.javafx.tk.FontLoader.loadFont.

public void

Field Detail

embeddedFontsLoadedback to summary
private boolean embeddedFontsLoaded

Flag to keep track whether the fontCache map has been initialized with the embedded fonts.

installedFontFactoryback to summary
pack-priv FontFactory installedFontFactory
theInstanceback to summary
private static PrismFontLoader theInstance

Constructor Detail

PrismFontLoaderback to summary
public PrismFontLoader()

Method Detail

createFontback to summary
private Font createFont(PGFont font)
createFontsback to summary
private Font[] createFonts(PGFont[] fonts)
fontback to summary
public Font font(String family, FontWeight weight, FontPosture posture, float size)

Implements abstract com.sun.javafx.tk.FontLoader.font.

Searches for an appropriate font based on the font family name and weight and posture style. This method is not guaranteed to return a specific font, but does its best to find one that fits the specified requirements. For SDK/runtime fonts, we will attempt to match properties to a SDK/runtime fonts. If a specific SDK font is not found in the runtime JAR, the font loading will revert to FontFactory default font, rather then finding closest matching available SDK font. This is how SDK font loading was handled in the past.

Parameters
family:String

The family of the font

weight:FontWeight

The weight of the font

posture:FontPosture

The posture or posture of the font

size:float

The point size of the font. This can be a fractional value

Annotations
@Override
getCharWidthback to summary
public float getCharWidth(char ch, Font font)

Implements abstract com.sun.javafx.tk.FontLoader.getCharWidth.

Annotations
@Override
getFamiliesback to summary
public List<String> getFamilies()

Implements abstract com.sun.javafx.tk.FontLoader.getFamilies.

Gets all the font families installed on the user's system, including any embedded fonts or SDK fonts.

Annotations
@Override
getFontFactoryFromPipelineback to summary
private FontFactory getFontFactoryFromPipeline()
getFontMetricsback to summary
public FontMetrics getFontMetrics(Font font)

Implements abstract com.sun.javafx.tk.FontLoader.getFontMetrics.

Annotations
@Override
getFontNamesback to summary
public List<String> getFontNames()

Implements abstract com.sun.javafx.tk.FontLoader.getFontNames.

Gets the names of all fonts that are installed on the users system, including any embedded fonts and SDK fonts.

Annotations
@Override
getFontNamesback to summary
public List<String> getFontNames(String family)

Implements abstract com.sun.javafx.tk.FontLoader.getFontNames.

Gets the names of all fonts in the specified font family that are installed on the users system, including any embedded fonts and SDK fonts.

Annotations
@Override
getInstanceback to summary
public static PrismFontLoader getInstance()
getSystemFontSizeback to summary
public float getSystemFontSize()

Implements abstract com.sun.javafx.tk.FontLoader.getSystemFontSize.

Annotations
@Override
loadEmbeddedFontDefinitionsback to summary
pack-priv Properties loadEmbeddedFontDefinitions()
loadEmbeddedFontsback to summary
private void loadEmbeddedFonts()
loadFontback to summary
public Font[] loadFont(InputStream in, double size, boolean loadAll)

Implements abstract com.sun.javafx.tk.FontLoader.loadFont.

Annotations
@Override
loadFontback to summary
public Font[] loadFont(String path, double size, boolean loadAll)

Implements abstract com.sun.javafx.tk.FontLoader.loadFont.

Annotations
@Override
loadFontback to summary
public void loadFont(Font font)

Implements abstract com.sun.javafx.tk.FontLoader.loadFont.

Annotations
@Override