Package com.adobe.fontengine.font
Interface ScalerDebugger
-
public interface ScalerDebugger
Receives events during the process of hinting and rasterizing glyphs. This interface is intended for development purposes only. During the development ofScaler
s, it is useful to have access to internal data structures. In a typical C/C++ environment, this is achieved with debugging code bracketed by #IFDEF statements. This technique is no available in Java; here is the pattern we follow instead: - this interface is meant to be called by the scalers, so that they can communicate interesting events and values to outside. - scalers have aScaler.setDebugger(ScalerDebugger)
method which can be called by the development environment to provide an implementation of this interface, and therefore receive events. This method typically stores theScalerDebugger
instance in a field, e.g.debugger
. - inside a scaler, the typical pattern is at an instrumentation point is: if (ScalerDebugger.debugOn && debugger != null) { this.debugger.foo (...); } Note that all the code related to debugging is protected the static final boolean
debugOn
. If that constant is false (the normal value for checked-in code and therefore for shipped code), then much of the code related to debugging is eliminated by the compiler, and we are left with a small overhead (a trivial setDebugger method in the scalers, a field, and the class for this interface). During development, one can set this constant to true to get fully functional debugging.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
debugOn
Enable or disable debugging support.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cscanCross(double x, double y)
OutlineConsumer2
getCFFOutlineConsumer()
void
hintedTTOutline(TTOutline outline)
void
ttInterpLog(String s)
void
ttScanHCross(int coordOnScanLine, int scanLineCoordI, boolean on)
void
ttScanLine(int x1, int y1, int x2, int y2)
void
ttScanLog(String s)
void
ttScanQuadCurve(int x1, int y1, int x2, int y2, int x3, int y3)
void
ttScanScanType(int scanType)
void
ttScanVCross(int coordOnScanLine, int scanLineCoordI, boolean on)
void
unhintedTTOutline(TTOutline outline)
-
-
-
Field Detail
-
debugOn
static final boolean debugOn
Enable or disable debugging support.- See Also:
- Constant Field Values
-
-
Method Detail
-
ttInterpLog
void ttInterpLog(String s)
-
cscanCross
void cscanCross(double x, double y)
-
getCFFOutlineConsumer
OutlineConsumer2 getCFFOutlineConsumer()
-
unhintedTTOutline
void unhintedTTOutline(TTOutline outline)
-
hintedTTOutline
void hintedTTOutline(TTOutline outline)
-
ttScanScanType
void ttScanScanType(int scanType)
-
ttScanLog
void ttScanLog(String s)
-
ttScanLine
void ttScanLine(int x1, int y1, int x2, int y2)
-
ttScanQuadCurve
void ttScanQuadCurve(int x1, int y1, int x2, int y2, int x3, int y3)
-
ttScanHCross
void ttScanHCross(int coordOnScanLine, int scanLineCoordI, boolean on)
-
ttScanVCross
void ttScanVCross(int coordOnScanLine, int scanLineCoordI, boolean on)
-
-