Top Fields Constructors Methods
com.sun.javafx.font

public abstract Class PrismFontStrike<T extends PrismFontFile>

extends Object
implements FontStrike
Class Inheritance
All Implemented Interfaces
com.sun.javafx.font.FontStrike
Known Direct Subclasses
com.sun.javafx.font.coretext.CTFontStrike, com.sun.javafx.font.directwrite.DWFontStrike, com.sun.javafx.font.freetype.FTFontStrike
Imports
java.util.HashMap, .Map, com.sun.javafx.geom.Path2D, .Point2D, .Shape, com.sun.javafx.geom.transform.Affine2D, .BaseTransform, com.sun.javafx.scene.text.GlyphList

Field Summary

Modifier and TypeField and Description
private int
private FontStrikeDesc
private DisposerRecord
protected boolean
private T
private Map<Integer, Glyph>
private int
private PrismMetrics
private float
private BaseTransform

Constructor Summary

AccessConstructor and Description
protected
PrismFontStrike(T fontResource, float size, BaseTransform tx, int aaMode, FontStrikeDesc desc)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
protected abstract DisposerRecord
protected abstract Glyph
createGlyph(int glyphCode)

protected abstract Path2D
createGlyphOutline(int glyphCode)

public boolean
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
public float

Returns:

advance of single char
getCharAdvance
(char
char
ch
)

Implements com.sun.javafx.font.FontStrike.getCharAdvance.

Access to individual character advances are frequently needed for layout understand that advance may vary for single glyph if ligatures or kerning are enabled

pack-priv DisposerRecord
public T
public Glyph
public Glyph
public Metrics
public Shape
pack-priv void
public int
getQuantizedPosition(Point2D point)

Implements com.sun.javafx.font.FontStrike.getQuantizedPosition.

Modifies the point argument to the quantized position suitable for the underlying glyph rasterizer.

public float
getSize()

Implements com.sun.javafx.font.FontStrike.getSize.

Returns the notional size of this strike with the graphics transform factored out.

public BaseTransform
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

aaModeback to summary
private int aaMode
descback to summary
private FontStrikeDesc desc
disposerback to summary
private DisposerRecord disposer
drawShapesback to summary
protected boolean drawShapes
fontResourceback to summary
private T fontResource
glyphMapback to summary
private Map<Integer, Glyph> glyphMap
hashback to summary
private int hash
metricsback to summary
private PrismMetrics metrics
sizeback to summary
private float size
transformback to summary
private BaseTransform transform

Constructor Detail

PrismFontStrikeback to summary
protected PrismFontStrike(T fontResource, float size, BaseTransform tx, int aaMode, FontStrikeDesc desc)

Method Detail

clearDescback to summary
public synchronized void clearDesc()

Implements com.sun.javafx.font.FontStrike.clearDesc.

Annotations
@Override
createDisposerback to summary
protected abstract DisposerRecord createDisposer(FontStrikeDesc desc)
createGlyphback to summary
protected abstract Glyph createGlyph(int glyphCode)
createGlyphOutlineback to summary
protected abstract Path2D createGlyphOutline(int glyphCode)
drawAsShapesback to summary
public boolean drawAsShapes()

Implements com.sun.javafx.font.FontStrike.drawAsShapes.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
getAAModeback to summary
public int getAAMode()

Implements com.sun.javafx.font.FontStrike.getAAMode.

Annotations
@Override
getCharAdvanceback to summary
public float getCharAdvance(char ch)

Implements com.sun.javafx.font.FontStrike.getCharAdvance.

Access to individual character advances are frequently needed for layout understand that advance may vary for single glyph if ligatures or kerning are enabled

Parameters
ch:char

char

Returns:float

advance of single char

Annotations
@Override
getDisposerback to summary
pack-priv DisposerRecord getDisposer()
getFontResourceback to summary
public T getFontResource()

Implements com.sun.javafx.font.FontStrike.getFontResource.

Annotations
@Override
getGlyphback to summary
public Glyph getGlyph(char ch)

Implements com.sun.javafx.font.FontStrike.getGlyph.

Annotations
@Override
getGlyphback to summary
public Glyph getGlyph(int glyphCode)

Implements com.sun.javafx.font.FontStrike.getGlyph.

Annotations
@Override
getMetricsback to summary
public Metrics getMetrics()

Implements com.sun.javafx.font.FontStrike.getMetrics.

Annotations
@Override
getOutlineback to summary
public Shape getOutline(GlyphList gl, BaseTransform transform)

Implements com.sun.javafx.font.FontStrike.getOutline.

Annotations
@Override
getOutlineback to summary
pack-priv void getOutline(GlyphList gl, BaseTransform transform, Path2D p)
getQuantizedPositionback to summary
public int getQuantizedPosition(Point2D point)

Implements com.sun.javafx.font.FontStrike.getQuantizedPosition.

Doc from com.sun.javafx.font.FontStrike.getQuantizedPosition.

Modifies the point argument to the quantized position suitable for the underlying glyph rasterizer. The return value is the sub pixel index which should be passed to Glyph#getPixelData(int) in order to obtain the correct glyph mask for the given point.

Annotations
@Override
getSizeback to summary
public float getSize()

Implements com.sun.javafx.font.FontStrike.getSize.

Returns the notional size of this strike with the graphics transform factored out. This is presently needed for the J2D pipeline but arguably the strike should not even need to keep this around except for needing to return metrics and outlines in user space. The consequence is we can't share a strike between 12 pt at scale of 2.0 and 24 pt at scale of 1.0

Annotations
@Override
getTransformback to summary
public BaseTransform getTransform()

Implements com.sun.javafx.font.FontStrike.getTransform.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override