A new beginning..
A new title anyway! Another in my series of Octory articles. This time it’s about using fonts.
Octory has a lot of options around the use of fonts, sizes, colours, styles and placement can all be modified on each item that uses them.
All the settings are explained in the documentation under the Appearance section. But there is a lot there so I’ll give you the benefit of my experience, and a lot of chats with Alexis the author.
Setting an individual item.
On text items the font properties can be set using a TextFontConfiguration dictionary.
This can take one or many values that can be used to override whatever the defaults are.
As per the documentation there are the following options available;
- Style – Cover this later
- TextAlignment – where it is placed in the box
- Size – font size
- SystemFontWeight – bold etc
- Color – what colour is used, separate light and dark mode can be specified.
So if you are using more than one text box, and if you’re not then why are you using Octory, this will get a bit repetitive!
Using the FontStyles.
Aha… As mentioned above there is a Style key which means all the settings shown above can actually be referenced in on word, provided they are defined in the FontStyles.
<dict> <key>Style</key> <string>Informative</string> </dict>
So that’s easy then, in the example the predefined FontStyle called Informative is used.
let’s look at the Informative FontStyle.
It’s important to note that you can name them anything you want, it’s just for you to reference easily.
<dict> <key>Informative</key> <dict> <key>Size</key> <integer>18</integer> <key>Color</key> <dict> <key>Style</key> <string>Corp</string> </dict> <key>SystemFontWeight</key> <string>Semibold</string> </dict> </dict>
Under FontStyles I created a Dictionary called Informative and defined the keys shown.
Note that Color also uses a predefined ColorStyles array, I covered this in a previous post and Colors are documented here.
Using the ColorStyles means a common colour theme can be used in both text and other elements that can change colour and also have light and dark mode colours.
Mix and match.
You can of course mix and match, example you want common fonts and colours but need to vary the position of the text. Simple use the TextAlignment key in the TextFontConfiguration whilst using the Style previously defined;
<dict> <key>Style</key> <string>Informative</string> <key>TextAlignment</key> <string>Center</string> </dict>
To sum up.
Use FontStyles! Combine them with ColorStyles and make your workflows look good and make it simple to build multiple workflows with common branded themes.