You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by hoa sung <ho...@yahoo.com> on 2012/10/01 10:41:03 UTC
Re: DO NOT REPLY [Bug 52711] Korean fonts don't render correctly
Could you show me your setting code for font. I have tried with code below
but It cannot render Korean characters in images
BufferedImage img = new BufferedImage(pgsize.width , pgsize.height
, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = (Graphics2D)img.createGraphics();
//clear the drawing area
graphics.setPaint(Color.BLUE);
//GraphicsEnvironment.getLocalGraphicsEnvironment();
Font font = new Font("Arial Unicode MS", Font.PLAIN, 14);
graphics.setFont(font);
graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,
pgsize.height));
slide[i].draw(graphics);
//save the output
FileOutputStream out = new FileOutputStream(destinationPath +
"slide-" + (i+1) + ".png");
javax.imageio.ImageIO.write(img, "png", out);
out.close();
Are there anyone can help me out ?
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52711-New-Korean-fonts-don-t-render-correctly-tp5497690p5711026.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: DO NOT REPLY [Bug 52711] Korean fonts don't render correctly
Posted by Yegor Kozlov <ye...@dinom.ru>.
The font muts be set in PowerPoint, not in Java. Open your .ppt file,
change the korean text to use Arial Unicode MS and rendering should
work fine.
Yegor
On Mon, Oct 1, 2012 at 12:41 PM, hoa sung <ho...@yahoo.com> wrote:
> Could you show me your setting code for font. I have tried with code below
> but It cannot render Korean characters in images
>
>
> BufferedImage img = new BufferedImage(pgsize.width , pgsize.height
> , BufferedImage.TYPE_INT_RGB);
> Graphics2D graphics = (Graphics2D)img.createGraphics();
> //clear the drawing area
> graphics.setPaint(Color.BLUE);
> //GraphicsEnvironment.getLocalGraphicsEnvironment();
> Font font = new Font("Arial Unicode MS", Font.PLAIN, 14);
>
> graphics.setFont(font);
>
>
> graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width,
> pgsize.height));
>
> slide[i].draw(graphics);
>
>
> //save the output
>
> FileOutputStream out = new FileOutputStream(destinationPath +
> "slide-" + (i+1) + ".png");
> javax.imageio.ImageIO.write(img, "png", out);
>
>
>
> out.close();
>
> Are there anyone can help me out ?
>
>
>
> --
> View this message in context: http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-52711-New-Korean-fonts-don-t-render-correctly-tp5497690p5711026.html
> Sent from the POI - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org