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,
Would you let me know the progress ?
(It is about 2 month since the last post)
Thanks.
Hi Kunikazu,
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,
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,
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