PSPx7, simple caption script: I want to change the font and maybe italic/bold/normal. My attempts at editing script resulted in errors. Tried changing [FontName] to the name of desired font but failed. Can it be done?
Bill
"Simple Caption" script - change font?
Moderator: Kathy_9
-
Briansdad
- Posts: 37
- Joined: Sat Oct 25, 2014 1:54 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ROG STRIX Z690-A GAMING WIFI D4
- processor: 12th Gen Intel Core i7-12700K 36
- ram: 32GB
- Video Card: NVIDIA GeForce RTX 3070 Ti
- Hard_Drive_Capacity: 3TB
- Monitor/Display Make & Model: BenQ SW271
- Corel programs: VideoStudio 2023
- Location: Midcoast Maine
-
LeviFiction
- Advisor
- Posts: 6831
- Joined: Thu Oct 02, 2008 1:07 pm
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: Alienware M17xR4
- processor: Intel Core i7-3630QM CPU - 2_40GH
- ram: 6 GB
- Video Card: NVIDIA GeForce GTX 660M
- sound_card: Sound Blaster Recon3Di
- Hard_Drive_Capacity: 500GB
- Corel programs: PSP: 8-2023
- Location: USA
Re: "Simple Caption" script - change font?
Yes, you just have to know how to format it.
The Scripting language is Python. Python is very easy, and very readable but, Python is also very picky about how you write things. I recommend a Python tutorial so you know how to write basic Python code. CodeAcademy is a free option.
The font name is written in what's known as a string. Strings must be surrounded by quotes. These can be single or double quotes but the opening quote must match the ending quote. And the entire line must end with a comma. For example.
The reason that the "SimpleCaption" script doesn't show this is because it's using a variable that's defined in another script altogether.
To add bold to the list you need to add the 'Bold' parameter. Capitalization is important here.
Also spacing is important. When indenting lines of code you must use the exact same amount and type of spacing. For example, 'Font' 'Italics' and 'Stroke' are all indented 12 spaces. You cannot use tabs, you must indent the exact same number of spaces.
Make sure you add a comma after App.Constants.Boolean.true
If you want the text to be "normal" instead of bold or italic. Just set the 'Italic' and 'Bold' parameters to App.Constants.Boolean.false
The Scripting language is Python. Python is very easy, and very readable but, Python is also very picky about how you write things. I recommend a Python tutorial so you know how to write basic Python code. CodeAcademy is a free option.
The font name is written in what's known as a string. Strings must be surrounded by quotes. These can be single or double quotes but the opening quote must match the ending quote. And the entire line must end with a comma. For example.
Code: Select all
'Font': 'Times New Roman',
To add bold to the list you need to add the 'Bold' parameter. Capitalization is important here.
Also spacing is important. When indenting lines of code you must use the exact same amount and type of spacing. For example, 'Font' 'Italics' and 'Stroke' are all indented 12 spaces. You cannot use tabs, you must indent the exact same number of spaces.
Code: Select all
'Font': 'Times New Roman',
'Italic': App.Constants.Boolean.true,
'Bold': App.Constants.Boolean.true,
If you want the text to be "normal" instead of bold or italic. Just set the 'Italic' and 'Bold' parameters to App.Constants.Boolean.false
https://levifiction.wordpress.com/
-
Briansdad
- Posts: 37
- Joined: Sat Oct 25, 2014 1:54 am
- System_Drive: C
- 32bit or 64bit: 64 Bit
- motherboard: ROG STRIX Z690-A GAMING WIFI D4
- processor: 12th Gen Intel Core i7-12700K 36
- ram: 32GB
- Video Card: NVIDIA GeForce RTX 3070 Ti
- Hard_Drive_Capacity: 3TB
- Monitor/Display Make & Model: BenQ SW271
- Corel programs: VideoStudio 2023
- Location: Midcoast Maine
Re: "Simple Caption" script - change font?
Thanks. This looks like exactly what I wanted. If I have further issues I will try CodeAcademy first.
Thanks again.
Bill
Thanks again.
Bill
