RE: Cannot set Japanese (non-Roman) font in Powerpoint
RE: Cannot set Japanese (non-Roman) font in Powerpoint
- Subject: RE: Cannot set Japanese (non-Roman) font in Powerpoint
- From: "Scott Babcock" <email@hidden>
- Date: Fri, 28 Oct 2005 10:01:14 -0700
- Thread-topic: Cannot set Japanese (non-Roman) font in Powerpoint
AppleScript is Unicode-challenged. If you were running this on a JPN OS, you'd have fewer problems, since the default code page is 932, which can represent these characters in a way that AppleScript understands.
In your non-JPN environment, you have to use some other representation. In order to ensure that translation issues don't muddle the following example, I'm using "<<" and ">>" to represent the guillemet characters. You create these by typing <option-\> and <option-shift-\>.
set fontName to (<<data utxt534E65874EFF5B8B>> as Unicode text)
The numbers there are hexadecimal values of the UTF-16 encodings for the Japanese characters in the font name. To get these values, I pasted the font name into TextEdit, and then dragged each character of the name to the drop box of the Character Info section of the Character Palette.
> Date: Thu, 27 Oct 2005 21:50:42 -0700
> From: Rosyna <email@hidden>
> Subject: Cannot set Japanese (non-Roman) font in Powerpoint
> To: AppleScript-Users <email@hidden>
> Message-ID: <p06230905bf875db9df09@[192.168.1.5]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> This is an odd problem I'm having. I'm trying to
> set the font in Powerpoint using AppleScript and
> it seems to be failing on the Script Editor side
> for non-Roman font names. For example, if I enter
> the following into a new script and press compile
>
> tell application "Microsoft PowerPoint"
> do Visual Basic "CommandBars.FindControl(
> msoControlComboBox , 1728 , \"\" , 0 ).Text =
> \"ÉqÉâÉMÉmäpÉS Pro W3\""
> end tell
>
>
> It turns into this yankee doodle:
>
> tell application "Microsoft PowerPoint"
> do Visual Basic "CommandBars.FindControl(
> msoControlComboBox , 1728 , \"\" , 0 ).Text =
> \"ÉqÉâÉMÉmäpÉS Pro W3\""
> end tell
>
>
> And of course, it fails. Is it possible to set this font via AppleScript?
> --
>
>
> Sincerely,
> Rosyna Keller
> Technical Support/Holy Knight/Always needs a hug
>
> Unsanity: Unsane Tools for Insanely Great People
>
> It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden