One thing a bit annoying in ren'py is that when you want just some words in a sentence to display in a different font, you have to use the {font} tag, and that text tag forces you to type in the whole path to the font file.
Or does it ?
There's a feature in Ren'Py that's not exactly there for that purpose, but we can take it to our advantage. Take for example the Electroharmonix beautiful font, inspired by japanese characters.
Code: Select all
define config.font_replacement_map |= {("jap", a, b) : ("fonts/electroharmonix.ttf", a, b) for a in (True, False) for b in (True, False)}
This allows the following dialogue to be much simpler than it would otherwise need to be :
Code: Select all
e "What does this say ? {font=jap}Speak, friend, and{/font}..."
g "{font=jap}and enter{/font}. It definitely says {font=jap}and enter{/font}."
e "But how do you say {font=jap}friend{/font} in normal english ?"
...
Technical explanations :
This actually remaps all four variants of the non-existing "jap" font (bold, italics, bold-italics and roman) to an actual font, the one at the provided path. The variants are determined by the a and b values, and since we're setting all four of them... See the doc.
Note though that any remapping taking the original file as a key will not work (but at the same time, would be pointless if the alias exists). In other words, there will not be two successive replacements.