Package org.apache.fontbox.ttf
Class GlyphRenderer
java.lang.Object
org.apache.fontbox.ttf.GlyphRenderer
This class provides a glyph to GeneralPath conversion for true type fonts.
Based on code from Apache Batik, a subproject of Apache XMLGraphics.
- See Also:
-
- http://xmlgraphics.apache.org/batik Contour rendering ported from PDF.js, viewed on 14.2.2015, rev 2e97c0d
- pdf.js/src/core/font_renderer.js
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classThis class represents one point of a glyph. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate GlyphDescriptionprivate static final org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate GeneralPathcalculatePath(GlyphRenderer.Point[] points) Use the given points to calculate a GeneralPath.private GlyphRenderer.Point[]Set the points of a glyph from the GlyphDescription.getPath()Returns the path of the glyph.private voidlineTo(GeneralPath path, GlyphRenderer.Point point) private intmidValue(int a, int b) private GlyphRenderer.PointmidValue(GlyphRenderer.Point point1, GlyphRenderer.Point point2) private voidmoveTo(GeneralPath path, GlyphRenderer.Point point) private voidquadTo(GeneralPath path, GlyphRenderer.Point ctrlPoint, GlyphRenderer.Point point)
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
glyphDescription
-
-
Constructor Details
-
GlyphRenderer
GlyphRenderer(GlyphDescription glyphDescription)
-
-
Method Details
-
getPath
Returns the path of the glyph.- Returns:
- the path
-
describe
Set the points of a glyph from the GlyphDescription. -
calculatePath
Use the given points to calculate a GeneralPath.- Parameters:
points- the points to be used to generate the GeneralPath- Returns:
- the calculated GeneralPath
-
moveTo
-
lineTo
-
quadTo
-
midValue
private int midValue(int a, int b) -
midValue
-