text,
JRCommonText.MARKUP_STYLED_TEXT.equals(printText.getMarkup()),//FIXMEMARKUP only static styled text appears on preview. no other markup
JRStyledTextAttributeSelector.getTextLocale(printText)
);
JRMeasuredText measuredText = textMeasurer.measure(
styledText,
0,
0,
false
);
printText.setTextHeight(measuredText.getTextHeight() < printText.getHeight() ? measuredText.getTextHeight() : printText.getHeight());
//printText.setLeadingOffset(measuredText.getLeadingOffset());
//printText.setLineSpacingFactor(measuredText.getLineSpacingFactor());
int textEnd = measuredText.getTextOffset();
String printedText;
if (JRCommonText.MARKUP_STYLED_TEXT.equals(printText.getMarkup()))
{
printedText = JRStyledTextParser.getInstance().write(styledText, 0, textEnd);
}