You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/02/19 23:31:41 UTC

DO NOT REPLY [Bug 52711] New: Korean fonts don't render correctly

https://issues.apache.org/bugzilla/show_bug.cgi?id=52711

             Bug #: 52711
           Summary: Korean fonts don't render correctly
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: dev@poi.apache.org
        ReportedBy: openholger@gmail.com
    Classification: Unclassified


Created attachment 28355
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28355
A single slide with some Korean characters

When using org.apache.poi.hslf.model.Slide.draw(Graphics2D) to render a slide
with Korean characters, just questions marks are shown. 

The problem just occurs when using Windows. POI renders the slide correctly on
MacOS.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52711] Korean fonts don't render correctly

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52711

--- Comment #2 from holgerbrandl <op...@gmail.com> 2012-02-19 22:40:31 UTC ---
Windows  is aware of the fonts, as the slide renders correctly in PowerPoint
2010. I've confirmed it on a another windows7 machine, where the problem was
the same (PowerPoint renders correctly, POI doesn't)

I don't know what I would have to do so that java can find the fonts. How can I
test/configure it?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52711] Korean fonts don't render correctly

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52711

Nick Burch <ni...@alfresco.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2012-02-19 22:34:54 UTC ---
Sounds like you don't have the required fonts installed on your windows box

Can you confirm that:
 * The required fonts are known to windows?
 * You've correctly set it up so that Java can find them?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52711] Korean fonts don't render correctly

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52711

--- Comment #3 from Yegor Kozlov <ye...@dinom.ru> 2012-02-21 10:19:52 UTC ---
It has to do with the fonts. POI renders text using Java2D and this framework
renders unicode text using unicode fonts. 

Try to change the font to Arial Unicode MS. Does the text render  correctly ?

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
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


Re: DO NOT REPLY [Bug 52711] Korean fonts don't render correctly

Posted by hoa sung <ho...@yahoo.com>.
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


DO NOT REPLY [Bug 52711] Korean fonts don't render correctly

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52711

holgerbrandl <op...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #4 from holgerbrandl <op...@gmail.com> 2012-02-21 21:34:28 UTC ---
Using Arial Unicode MS fixes the problem. Thanks for your help! -H

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org