I'm puzzled by FontSubstitutions
. The help says this:
FontSubstitutions is an option for Style and Cell that gives a list of substitutions to try for font family names.
I typed this:
Options[Style, FontSubstitutions]
with the result:
Options::optnf: FontSubstitutions is not a known option for Style. >>
OK. So I try the example instead:
Options[$FrontEnd, FontSubstitutions]
and get a list of rules:
{FontSubstitutions -> {"Helv" -> "Helvetica", "Arial" -> "Helvetica",
"Times New Roman" -> "Times", "Courier New" -> "Courier",
"Lucidabright" -> "Times", "Charter" -> "Helvetica",
"Lucidatypewriter" -> "Courier", "Fixed" -> "Monaco",
"AGaramond" -> "Times", "Avant Garde" -> "Helvetica", "Bodoni" -> "Times",
"Bookman" -> "Times", "Caslon 3 Roman" -> "Times", ...
(Some of these rules are a bit strange - almost like misspellings...)
In the tutorial tutorial/TextAndFontOptions, I read:
In addition, you can set FontSubstitutions to be a list of rules that give replacements to try for font family names.
So my interpretation of this is that, when you supply a string for FontFamily
, Mathematica will, on failing to find any kind of matching font for that string, see if there's a rule for it, and then use the equivalent font given by that rule. However, I've not yet managed to make it happen.
Here I try Bodoni. It's not currently active (and the basic face is called Bodoni Book anyway), so it should be substituted by Times. But it appears as Lucida Grande.
Style["The quick brown fox", 60, FontFamily -> "Bodoni"]
and I couldn't get any of the rules to be applied.
I also tried setting a paragraph of text in a particular font (the terrible Dom Casual, which has a rule replacing it with Helvetica), then closing Mathematica, de-activating the font, then re-opening Mathematica and the document. The paragraph's font reverted to ... Lucida Grande.
So, does anyone know how FontSubstitutions
works?
FontSubstitutions
by using the selector syntax form for options like this:CurrentValue[$FrontEnd, {FontSubstitutions, "Bodoni"}]
. You can also use assign values by putting theCurrentValue
expression on the left-hand side of an equal sign. $\endgroup$FontSubstitutions
is not working correctly on Mac. $\endgroup$CurrentValue
have no effect. Must be cached somewhere? $\endgroup$