Package com.openhtmltopdf.pdfboxout
Class PdfBoxTextRenderer
java.lang.Object
com.openhtmltopdf.pdfboxout.PdfBoxTextRenderer
- All Implemented Interfaces:
TextRenderer
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate BidiReordererprivate static float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<PdfBoxSlowOutputDevice.FontRun> divideIntoFontRuns(FSFont font, String str, BidiReorderer reorderer) voiddrawString(OutputDevice outputDevice, String string, float x, float y) voiddrawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info) floatgetFSFontMetrics(FontContext context, FSFont font, String string) private static PdfBoxTextRenderer.ReplacementChargetReplacementChar(FSFont font) intprivate floatgetStringWidthSlow(FSFont bf, String str) intgetWidth(FontContext context, FSFont font, String string) Rarely need to use this method directly.static booleanisJustificationSpace(int c) voidsetFontScale(float scale) voidsetSmoothingLevel(int level) Deprecated.voidsetSmoothingThreshold(float fontsize) Set the smoothing threashold.voidsetup(FontContext context) voidsetup(FontContext context, BidiReorderer reorderer)
-
Field Details
-
TEXT_MEASURING_DELTA
private static float TEXT_MEASURING_DELTA -
_reorderer
-
_loggedMissingFont
private boolean _loggedMissingFont -
_loggedMissingMetrics
private boolean _loggedMissingMetrics
-
-
Constructor Details
-
PdfBoxTextRenderer
public PdfBoxTextRenderer()
-
-
Method Details
-
setup
-
drawString
- Specified by:
drawStringin interfaceTextRenderer
-
drawString
public void drawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info) - Specified by:
drawStringin interfaceTextRenderer
-
getFSFontMetrics
- Specified by:
getFSFontMetricsin interfaceTextRenderer
-
isJustificationSpace
public static boolean isJustificationSpace(int c) -
getReplacementChar
-
divideIntoFontRuns
public static List<PdfBoxSlowOutputDevice.FontRun> divideIntoFontRuns(FSFont font, String str, BidiReorderer reorderer) -
getStringWidthSlow
-
getWidth
Description copied from interface:TextRendererRarely need to use this method directly. Instead favorBreakerstatic method instead.- Specified by:
getWidthin interfaceTextRenderer
-
setFontScale
public void setFontScale(float scale) - Specified by:
setFontScalein interfaceTextRenderer
-
getFontScale
public float getFontScale()- Specified by:
getFontScalein interfaceTextRenderer
-
setSmoothingThreshold
public void setSmoothingThreshold(float fontsize) Description copied from interface:TextRendererSet the smoothing threashold. This is a font size above which all text will be anti-aliased. Text below this size will not be antialiased. Set to -1 for no antialiasing. Set to 0 for all antialising. Else, set to the threshold font size. does not take font scaling into account.- Specified by:
setSmoothingThresholdin interfaceTextRenderer
-
getSmoothingLevel
public int getSmoothingLevel()- Specified by:
getSmoothingLevelin interfaceTextRenderer
-
setSmoothingLevel
Deprecated.- Specified by:
setSmoothingLevelin interfaceTextRenderer- Parameters:
level- no-op
-
setup
- Specified by:
setupin interfaceTextRenderer
-