Class PdfBoxTextRenderer
java.lang.Object
com.openhtmltopdf.pdfboxout.PdfBoxTextRenderer
- All Implemented Interfaces:
TextRenderer
-
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) intintgetWidth(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)
-
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) -
divideIntoFontRuns
public static List<PdfBoxSlowOutputDevice.FontRun> divideIntoFontRuns(FSFont font, String str, BidiReorderer reorderer) -
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
-