From b01b1a02d17b155385d50dac41150f10c611cfd6 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 25 Sep 2012 09:41:21 -0500 Subject: [PATCH] IDEMPIERE-439 Chinese Characters not on PDF / Thanks to Paul Bowden (phib) for the bug report and the fix --- .../compiere/print/layout/StringElement.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/print/layout/StringElement.java b/org.adempiere.base/src/org/compiere/print/layout/StringElement.java index 885d7a8dc2..3a5b258d45 100644 --- a/org.adempiere.base/src/org/compiere/print/layout/StringElement.java +++ b/org.adempiere.base/src/org/compiere/print/layout/StringElement.java @@ -470,10 +470,19 @@ public class StringElement extends PrintElement { layout = new TextLayout (iter, g2D.getFontRenderContext()); yPen = yPos + layout.getAscent(); - // layout.draw(g2D, xPen, yPen); - g2D.setFont(m_font); - g2D.setPaint(m_paint); - g2D.drawString(iter, xPen, yPen); + + boolean fastDraw = LayoutEngine.s_FASTDRAW; + if (fastDraw && !isView && !is8Bit) + fastDraw = false; + + if ( fastDraw ) + { + g2D.setFont(m_font); + g2D.setPaint(m_paint); + g2D.drawString(iter, xPen, yPen); + } + else + layout.draw(g2D, xPen, yPen); // yPos += layout.getAscent() + layout.getDescent() + layout.getLeading(); if (width < layout.getAdvance())