Rendering text box with TextOrientation = VerticalFarEast

Hello.

We Japanese sometimes write text vertically .

MsoTextOrientation Enum (Microsoft.Office.Core) | Microsoft Learn

But I’ve found that Aspose.Slides cannot render this text with
TextOrientation = “VerticalFarEast” correctly. It seems to be
treated just like “Vertical”.

Attached is a sample presentation data
which contains vertical Japanese text areas.
Its second page is the expected rendering result image
created by MS-Office 2010.

Will you take a look at this file ?

Thank you.


Correction:
It seems that Aspose.Sides currently
treat VerticalFarEast just like “Downward”, not “Vertical”.

Hi Kunikazu,


I have worked with the presentation file shared by you and have observed the rendering issues for vertical text in generated thumbnails using Aspose.Slides for .NET 7.2.0. I have created an issue with ID SLIDESNET-34115 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. For reference, I have attached the generated thumbnails.

We are sorry for your inconvenience,

Would you let me know the progress ?
(It is about 2 month since the last post)

Thanks.

Hi Kunikazu,


I have verified from our issue tracking system and regret to share that the issue is still unresolved. I have raised the priority of the issue and have requested our development team to kindly schedule the issue for investigation. I will be able to share the feedback with you as soon as it will be shared by our development team.

Many Thanks,

For VerticalFarEast, just try to put “@” in front of the font name,
and that would make the expected result.

About VerticalFarEast text orientation, see also:
http://msdn.microsoft.com/en-us/library/cc194859.aspx
http://blogs.msdn.com/b/oldnewthing/archive/2012/07/19/10331400.aspx
http://stackoverflow.com/questions/2496160/what-does-the-mean-when-prefixed-to-windows-font-face-name

Hi Kunikazu,


It seems that you have suggested some feedback that worked for your for future reference of our worthy customers. If there is any thing else, I may offer you in this regard.

Many Thanks,

Actually it is a suggention for you (Aspose) , and not for users.

Unfortunately, MS Office user cannot select a font with “@” prefix directly.

My scenario is that with PowerPoint,
the customer selects a font “MS Gothic” for example
and set the text orientation of some text boxes to VerticalFarEast .

Then Aspose.Slides should create a logical font with font name="@MS Gothic"
internally, and draw these text boxes with this logical font.

— begin quote from MSDN —
To display text vertically on Windows, enumerate the
available fonts as usual and select a font whose typeface name
begins with the at (@) character. Then create a LOGFONT
structure, setting both the escapement and the orientation to 270
degrees. Calls to TextOut are the same as for horizontal
text.
— end quote from MSDN —
(http://msdn.microsoft.com/en-us/library/cc194859.aspx)

So, please try something like this:

if (textOrientation == VerticalFarEast){
using (tempFont = new Font("@"+currentFontName, currentFontSize)){
StringFormat sf = new StringFormat(StringFormatFlags.DirectionVertical);
g.DrawString(str, tempFont, x,y,sf );
}
}else if (textOrientation == Vertical){
StringFormat sf = new StringFormat(StringFormatFlags.DirectionVertical);
g.DrawString(str, currentFont, x,y,sf );
}

Hi Kunikazu,


Thanks for your suggestions. I have appended the information in our issue tracking system and will share the feedback with you once the concerned issue will be resolved.

Many Thanks,

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


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan