Package com.teamten.font
Class AbstractFont
java.lang.Object
com.teamten.font.AbstractFont
- All Implemented Interfaces:
Font
- Direct Known Subclasses:
DummyFont
,FailoverFont
,PdfBoxFont
,SmallCapsFont
,TrackingFont
Parent of real font classes, with stub methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.teamten.font.Font
Font.Metrics
-
Constructor Summary
ConstructorsConstructorDescriptionAn abstract font with no ligature support.AbstractFont
(Ligatures ligatures) An abstract font with ligature support. -
Method Summary
Modifier and TypeMethodDescriptionlong
getKerning
(int leftChar, int rightChar, double fontSize) Get the kerning between the two code points.protected void
setLigatures
(Ligatures ligatures) transformLigatures
(String text) Replaces all ligatures (supported by this font) in the string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.teamten.font.Font
draw, getCharacterMetrics, getSpaceWidth, getStringMetrics, hasCharacter
-
Constructor Details
-
AbstractFont
public AbstractFont()An abstract font with no ligature support. -
AbstractFont
An abstract font with ligature support.
-
-
Method Details
-
setLigatures
-
getKerning
public long getKerning(int leftChar, int rightChar, double fontSize) Description copied from interface:Font
Get the kerning between the two code points. The result is in scaled points.- Specified by:
getKerning
in interfaceFont
fontSize
- the size of the font in points.
-
transformLigatures
Description copied from interface:Font
Replaces all ligatures (supported by this font) in the string.- Specified by:
transformLigatures
in interfaceFont
-