-
1. Re: Setting PS5 Fonts with a VBScript
Michael L Hale Oct 27, 2011 1:50 PM (in response to scripternovice)If VB is like javascript you have to use the font's postscript name. Which in most cases is not the same as the name displayed in Photoshop. For example on my system 'Arial Regular' requires 'ArialMT'
-
2. Re: Setting PS5 Fonts with a VBScript
scripternovice Oct 29, 2011 2:11 PM (in response to Michael L Hale)Thanks, Michael - that did the trick. How do I find the PostScript name for
any font named in Photoshop?
-
3. Re: Setting PS5 Fonts with a VBScript
Mikaeru69 Oct 29, 2011 4:03 PM (in response to scripternovice)I wrote a script, for CS2 or later, which lets you obtain the PostScript name of a font according to family and style (using pop-up menus similar to the ones found in the character palette). The script, named "Get Font PostScript Name", is part of the JSON Sample Scripts and requires the JSON Action Manager library. It has been successfully tested in CS4 on Mac OS X, but should be platform agnostic.
HTH
-
4. Re: Setting PS5 Fonts with a VBScript
scripternovice Oct 30, 2011 8:02 PM (in response to Mikaeru69)Thanks for the scripts, but I was unable to install the Action Manager, and
could not determine what mistake I was making. Since then, have had
success typing in Word some text in desired font, saving as a PDF, and then
finding the PostScript name from Properties. That will at least help me
until I solve my problem with your script.
-
5. Re: Setting PS5 Fonts with a VBScript
Mikaeru69 Oct 31, 2011 3:34 AM (in response to scripternovice)Thanks for your feedback.
I prepared a stand-alone version of the script which doesn't require including files from the JSON Action Manager library: Get-Font-PostScript-Name-SA.js.zip
Once unzipped, move the script to Presets>Scripts inside your Photoshop CS5 folder; after (re)starting the application, the script should be available from the File>Automate menu, and display an interactive dialog (from which you can copy the PostScript name of the selected font from the text field):
Please let me know if you have any problem...
-
6. Re: Setting PS5 Fonts with a VBScript
Michael L Hale Oct 31, 2011 6:24 AM (in response to scripternovice)From looking at the VBScript guide you should be able to find the postscript name of a font using VB. The Application object has a property called Fonts which contains a collection of TextFont objects. One the the properties of TextFont is PostScriptName. So if it is available to VBScript I would think that it is also available to VB.Net or whatever flavor you are using.
-
7. Re: Setting PS5 Fonts with a VBScript
scripternovice Oct 31, 2011 3:32 PM (in response to Mikaeru69)Thanks, Mikaeru69-it works beautifully!
-
8. Re: Setting PS5 Fonts with a VBScript
scripternovice Oct 31, 2011 3:36 PM (in response to Michael L Hale)Thanks, Michael, for another approach. I have VB 2008 installed, and will
try it.



