Package com.openhtmltopdf.extend
Interface TextRenderer
public interface TextRenderer
-
Method Summary
Modifier and Type Method Description voiddrawString(OutputDevice outputDevice, String string, float x, float y)voiddrawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info)floatgetFontScale()FSFontMetricsgetFSFontMetrics(FontContext context, FSFont font, String string)intgetSmoothingLevel()intgetWidth(FontContext context, FSFont font, String string)Rarely need to use this method directly.voidsetFontScale(float scale)voidsetSmoothingLevel(int level)Deprecated.no-op, will be removed in a future release.voidsetSmoothingThreshold(float fontsize)Set the smoothing threashold.voidsetup(FontContext context)
-
Method Details
-
setup
-
drawString
-
drawString
void drawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info) -
getFSFontMetrics
-
getWidth
Rarely need to use this method directly. Instead favorBreakerstatic method instead. -
setFontScale
void setFontScale(float scale) -
getFontScale
float getFontScale() -
setSmoothingThreshold
void setSmoothingThreshold(float fontsize)Set 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. -
getSmoothingLevel
int getSmoothingLevel() -
setSmoothingLevel
void setSmoothingLevel(int level)Deprecated.no-op, will be removed in a future release. Anti-aliasing is now controlled via the smoothing threshhold.- Parameters:
level- no-op
-