Top Inners Fields Constructors Methods
com.openhtmltopdf.pdfboxout

public Class PdfBoxTextRenderer

extends Object
implements TextRenderer
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.extend.TextRenderer
Imports
java.io.IOException, java.util.ArrayList, .List, java.util.logging.Level, com.openhtmltopdf.bidi.BidiReorderer, com.openhtmltopdf.extend.FontContext, .OutputDevice, .TextRenderer, com.openhtmltopdf.pdfboxout.PdfBoxFontResolver.FontDescription, .PdfBoxSlowOutputDevice.FontRun, com.openhtmltopdf.render.FSFont, .FSFontMetrics, .JustificationInfo, com.openhtmltopdf.util.LogMessageId, .OpenUtil, .ThreadCtx, .XRLog

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private BidiReorderer
private static float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static List<PdfBoxSlowOutputDevice.FontRun>
public void
drawString(OutputDevice outputDevice, String string, float x, float y)

Implements com.openhtmltopdf.extend.TextRenderer.drawString.

public void
drawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info)

Implements com.openhtmltopdf.extend.TextRenderer.drawString.

public float
public FSFontMetrics
private static PdfBoxTextRenderer.ReplacementChar
public int
private float
public int
getWidth(FontContext context, FSFont font, String string)

Implements com.openhtmltopdf.extend.TextRenderer.getWidth.

Rarely need to use this method directly.

public static boolean
public void
public void
public void
setSmoothingThreshold(float fontsize)

Implements com.openhtmltopdf.extend.TextRenderer.setSmoothingThreshold.

Set the smoothing threashold.

public void
setup(FontContext context, BidiReorderer reorderer)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_loggedMissingFontback to summary
private boolean _loggedMissingFont
_loggedMissingMetricsback to summary
private boolean _loggedMissingMetrics
_reordererback to summary
private BidiReorderer _reorderer
TEXT_MEASURING_DELTAback to summary
private static float TEXT_MEASURING_DELTA

Constructor Detail

PdfBoxTextRendererback to summary
public PdfBoxTextRenderer()

Method Detail

divideIntoFontRunsback to summary
public static List<PdfBoxSlowOutputDevice.FontRun> divideIntoFontRuns(FSFont font, String str, BidiReorderer reorderer)
drawStringback to summary
public void drawString(OutputDevice outputDevice, String string, float x, float y)

Implements com.openhtmltopdf.extend.TextRenderer.drawString.

Annotations
@Override
drawStringback to summary
public void drawString(OutputDevice outputDevice, String string, float x, float y, JustificationInfo info)

Implements com.openhtmltopdf.extend.TextRenderer.drawString.

Annotations
@Override
getFontScaleback to summary
public float getFontScale()

Implements com.openhtmltopdf.extend.TextRenderer.getFontScale.

getFSFontMetricsback to summary
public FSFontMetrics getFSFontMetrics(FontContext context, FSFont font, String string)

Implements com.openhtmltopdf.extend.TextRenderer.getFSFontMetrics.

Annotations
@Override
getReplacementCharback to summary
private static PdfBoxTextRenderer.ReplacementChar getReplacementChar(FSFont font)
getSmoothingLevelback to summary
public int getSmoothingLevel()

Implements com.openhtmltopdf.extend.TextRenderer.getSmoothingLevel.

getStringWidthSlowback to summary
private float getStringWidthSlow(FSFont bf, String str)
getWidthback to summary
public int getWidth(FontContext context, FSFont font, String string)

Implements com.openhtmltopdf.extend.TextRenderer.getWidth.

Doc from com.openhtmltopdf.extend.TextRenderer.getWidth.

Rarely need to use this method directly. Instead favor Breaker static method instead.

Annotations
@Override
isJustificationSpaceback to summary
public static boolean isJustificationSpace(int c)
setFontScaleback to summary
public void setFontScale(float scale)

Implements com.openhtmltopdf.extend.TextRenderer.setFontScale.

setSmoothingLevelback to summary
public void setSmoothingLevel(int level)

Implements com.openhtmltopdf.extend.TextRenderer.setSmoothingLevel.

Deprecated

Parameters
level:int

Doc from com.openhtmltopdf.extend.TextRenderer.setSmoothingLevel.

no-op

Annotations
@Deprecated
@Override
setSmoothingThresholdback to summary
public void setSmoothingThreshold(float fontsize)

Implements com.openhtmltopdf.extend.TextRenderer.setSmoothingThreshold.

Doc from com.openhtmltopdf.extend.TextRenderer.setSmoothingThreshold.

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.

setupback to summary
public void setup(FontContext context, BidiReorderer reorderer)
setupback to summary
public void setup(FontContext context)

Implements com.openhtmltopdf.extend.TextRenderer.setup.

Annotations
@Override
com.openhtmltopdf.pdfboxout back to summary

private Class PdfBoxTextRenderer.ReplacementChar

extends Object
Class Inheritance
  • java.lang.Object
  • com.openhtmltopdf.pdfboxout.PdfBoxTextRenderer.ReplacementChar

Field Summary

Modifier and TypeField and Description
pack-priv PdfBoxFontResolver.FontDescription
pack-priv String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fontDescriptionback to summary
pack-priv PdfBoxFontResolver.FontDescription fontDescription
replacementback to summary
pack-priv String replacement

Constructor Detail

ReplacementCharback to summary
private ReplacementChar()