IDEMPIERE-439 Chinese Characters not on PDF / Thanks to Paul Bowden (phib) for the bug report and the fix

This commit is contained in:
Carlos Ruiz 2012-09-25 09:41:21 -05:00
parent 8de7da2ea5
commit b01b1a02d1
1 changed files with 13 additions and 4 deletions

View File

@ -470,10 +470,19 @@ public class StringElement extends PrintElement
{ {
layout = new TextLayout (iter, g2D.getFontRenderContext()); layout = new TextLayout (iter, g2D.getFontRenderContext());
yPen = yPos + layout.getAscent(); yPen = yPos + layout.getAscent();
// layout.draw(g2D, xPen, yPen);
boolean fastDraw = LayoutEngine.s_FASTDRAW;
if (fastDraw && !isView && !is8Bit)
fastDraw = false;
if ( fastDraw )
{
g2D.setFont(m_font); g2D.setFont(m_font);
g2D.setPaint(m_paint); g2D.setPaint(m_paint);
g2D.drawString(iter, xPen, yPen); g2D.drawString(iter, xPen, yPen);
}
else
layout.draw(g2D, xPen, yPen);
// //
yPos += layout.getAscent() + layout.getDescent() + layout.getLeading(); yPos += layout.getAscent() + layout.getDescent() + layout.getLeading();
if (width < layout.getAdvance()) if (width < layout.getAdvance())