Java Docs missing for "IBasePortionFormat" interface

Hi,


Please provide some description about the “IBasePortionFormat” methods listed below:

1. getEastAsianFont
2. getLatinFont
3. getComplexScriptFont
4. getSymbolFont

Please answer following questions:
1. What do these method return?
2. How are they different from each other?


Thanks
Praneeth


Hi Paraneeth,


I am sorry for your inconvenience. Actually, the slide portion can have text in normal Latin or plain, east Asian language, a complex script or in the form of symbol. So, depending on the type of text in the portion the respective font type is set. If East Asian text is used in portion, you will look for font in getEastAsianFont() method and so on. In fact, you can check all the specified methods and discard ones which return null and keep those returning valid font values. I hope this will clarify the concept.

Many Thanks,

Hi,


We are running following code to get the fonts used by each portion of presentation.

public void getFontsForEachPortion(Presentation ppt){

ITextFrame[] textFramesPPTX = SlideUtil.getAllTextFrames(ppt, true);

//Loop through the Array of TextFrames
for (int i = 0; i < textFramesPPTX.length; i++)
<span class="code-comment">//Loop through paragraphs in current ITextFrame

for(IParagraph para : textFramesPPTX[i].getParagraphs())

<span class="code-comment">//Loop through portions in the current IParagraph

for(IPortion port : para.getPortions())
{
//Display text in the current portion
System.out.print(port.getText());

    <span class="code-comment">//Display font name of the text

if (port.getPortionFormat().getLatinFont() != null)
System.out.print(port.getPortionFormat().getLatinFont().getFontName());

//Display font name of the text
if (port.getPortionFormat().getComplexScriptFont() != null)
System.out.print(port.getPortionFormat().getComplexScriptFont().getFontName());



//Display font name of the text
if (port.getPortionFormat().getEastAsianFont() != null)
System.out.print(port.getPortionFormat().getEastAsianFont().getFontName());

//Display font name of the text
if (port.getPortionFormat().getSymbolFont() != null)
System.out.print(port.getPortionFormat().getSymbolFont().getFontName());}

}


The above code does not print the font name for those portions which used Calibri font. I am getting the portion text but not getting font name. In fact, it works for other fonts used in presentation like Arial.

Please help us in resolving this issue.

The sample presentation is attached with this post. Please find the attachment.

NOTE: We are running code at linux machine (Oracle linux 5 (Intel 64-bit)) and using Aspose.Slides 15.1.0-java.

Thanks
Praneeth

Hi Praneeth,

I have worked with the presentation file shared using attached code and have been able to reproduce the issue specified. It seems to be an issue with Aspose.Slides and I have added a ticket with ID SLIDESJAVA-34756 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

Hi,



For your information, the issue related to issue ID SLIDESJAVA-34756 is not only restricted to Calibri font.
I am seeing it with other fonts as well like HYHeadLine-Medium.

Please find the attached presentation which can be used for further investigation.

For many portions, I am getting portion text but all of following methods return null for those portions.


1. getEastAsianFont
2. getLatinFont
3. getComplexScriptFont
4. getSymbolFont




Thanks
Praneeth

Hi Praneeth,



I have further tested the presentation and have appended this in the associated
issue for investigation and resolution. We will share the feedback with you as
soon as the issue will be resolved.



We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-34756) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.