final float y = globalHeight - y2;
final AffineTransform affineTransform = textSpec.getGraphics().getTransform();
final float translateX = (float) affineTransform.getTranslateX();
final FontNativeContext nativeContext = baseFontRecord.getNativeContext();
if (baseFontRecord.isTrueTypeFont() && textSpec.isBold() && nativeContext.isNativeBold() == false)
{
final float strokeWidth = textSpec.getFontSize() / 30.0f; // right from iText ...
if (strokeWidth == 1)
{
cb.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL);
}
else
{
cb.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE);
cb.setLineWidth(strokeWidth);
}
}
else
{
cb.setTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL);
}
// if the font does not declare to be italics already, emulate it ..
if (baseFontRecord.isTrueTypeFont() && textSpec.isItalics() && nativeContext.isNativeItalics() == false)
{
final float italicAngle =
baseFont.getFontDescriptor(BaseFont.ITALICANGLE, textSpec.getFontSize());
if (italicAngle == 0)
{