#2728 UTF-8 characters not output to PDF

open
nobody
None
5
2012-10-05
2012-10-05
No

UTF-8 characters not output to PDF
due to drawing bug in StringElement.java

Fix sponsored by FCS.

Patch:
diff -r 56255f744c55 base/src/org/compiere/print/layout/StringElement.java
--- a/base/src/org/compiere/print/layout/StringElement.java Tue Sep 11 16:52:50 2012 +1000
+++ b/base/src/org/compiere/print/layout/StringElement.java Wed Sep 19 17:35:35 2012 +1000
@@ -470,10 +470,19 @@
{
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())

Discussion


Log in to post a comment.