Apologies if this has been asked, I searched but couldn't find anything. I'm messing around with a story and enjoying it. One of the things I'm doing which I'm hoping will help make a more immersive experience is giving some characters custom fonts or text sizes - a computer who's dialogue is all in Courier New, or a giant-sized character who has much larger size text.
Customizing the appearance of this dialogue is easy enough. However, I'm concerned that some players might find it annoying, and want to turn it off. Is there a way to program in some kind of variable they can select at the start of the story that will toggle whether font changes in later passages show up, or everything remains at default?
Comments
though this isn't a general change and must be pasted to every passage
Harlowe uses a tw-story element to contain the side-bar and current passage text.
1. Adding and Removing the "fancy-fonts" CSS class name.
Add two links like the following somewhere in your story, the first add the CSS class name to the st-story element and the second removes it.
2. Styling the dialogue, this part of the solution is broken into two smaller parts:
2a. Using markup to distinguish the different characters.
You could use a specific named hook for each character's dialogue like so:
2b. Using CSS based on the markup in point 2a to style the dialogue.
The following example just changes the font colours for the overall story as well as the computer and giant dialogue, you could just as easily change the font-family or anything else you wish to. The CSS should be placed within your story's Story Stylesheet area.