Bug 55030

Summary: RichTextRun getFontName can not get chinese font name
Product: POI Reporter: Linfei Zhao <zlfdtc1983>
Component: HSLFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.9-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 58196    
Attachments: File for GetFontName

Description Linfei Zhao 2013-05-30 10:17:00 UTC
In PPT, when using POI to get the text fontname of textbox, it can not get the correct fontname of chinese text.

searching for help, thanks.
Comment 1 Nick Burch 2013-05-30 11:57:33 UTC
Can you please upload a sample file that shows the issue, along with some code (ideally a unit test) that highlights the problem? Please also let us know what powerpoint things the font name is
Comment 2 Abhinav Mathur 2013-05-30 12:05:42 UTC
Please see this bug https://issues.apache.org/bugzilla/show_bug.cgi?id=54880

It is similar to the current bug. I have attached the sample file with it.
Comment 3 Nick Burch 2013-05-30 12:36:42 UTC
Any chance you could provide a snippet of code (or even better a failing unit test) that shows the problem using that sample file? And also let us know what powerpoint thinks the font is?
Comment 4 Abhinav Mathur 2013-05-30 12:50:22 UTC
I think the problem is in getFontName() method of RichTextRun.java.

The same problem is  being discussed with code here on stackoverflow
http://stackoverflow.com/questions/2687522/problem-with-using-apache-poi-to-convert-ppt-to-image
Comment 5 Abhinav Mathur 2013-05-30 12:55:27 UTC
I think the problem is in getFontName() method of RichTextRun.java.

The same problem is  being discussed with code here on stackoverflow
http://stackoverflow.com/questions/2687522/problem-with-using-apache-poi-to-convert-ppt-to-image
Comment 6 Nick Burch 2013-05-31 21:18:58 UTC
In r1488403 I have added unit tests based on the sample file supplied in bug #54880. My unit test passes just fine...

If you could please produce a unit test that does show the problem, that would help us with narrowing down the issue
Comment 7 Linfei Zhao 2013-06-03 05:45:15 UTC
Created attachment 30378 [details]
File for GetFontName

the fontname of chinese text is "隶书", but actually when I use getFontName of RichTextRun.java, the font name is "Times New Roman".
Comment 8 Linfei Zhao 2013-06-03 06:47:32 UTC
I have uploaded a PPT file 
(In reply to Abhinav Mathur from comment #2)
> Please see this bug https://issues.apache.org/bugzilla/show_bug.cgi?id=54880
> 
> It is similar to the current bug. I have attached the sample file with it.
Comment 9 Linfei Zhao 2013-06-03 06:48:39 UTC
I have uploaded a PPT file as attachment
(In reply to Nick Burch from comment #1)
> Can you please upload a sample file that shows the issue, along with some
> code (ideally a unit test) that highlights the problem? Please also let us
> know what powerpoint things the font name is
Comment 10 Andreas Beeker 2015-12-31 23:51:22 UTC
Thanks for the sample file - this is fixed via r1722479