4
$\begingroup$

I'm using version 8.0.4.0 on a Mac, and recently made my own .otf and .ttf fonts at PaintFont.com. The font can be based on pretty much anything, including handwriting, and covers everything from alpha-numerics, symbols, alphabets from other languages, punctuation, and ligatures. This can be very useful if you want your figures and text to look a little more personalized.

The good news is, when I use something like:

Text[Style["This is the text I want in a different font.", FontFamily->"Example Font"]]

basic alpha-numerics, capitals and lowercase, work just fine, but certain symbols, including ! @ # % ^ * ( ) ~ - = + [ ] { } ; : | < >, Greeks, and so forth, show up simply in Mathematica's default font, even though I have characters for my font that definitely work (I've tested them in Word, etc.).

Just an example, if I type:

Text[\[CapitalSigma]]

I get a capital sigma in default font, even though I definitely have that symbol in my own font.

Is there any reason why Mathematica would accept certain characters from a font and not others? Are these characters "reserved" somehow by Mathematica and are "unformatable"?

Thanks!

$\endgroup$
9
  • $\begingroup$ I don't know much about fonts myself but it would probably help if you could link to a font that does show this problem (the fonts I tried work fine). $\endgroup$
    – Szabolcs
    May 27, 2014 at 21:23
  • $\begingroup$ @Szabolcs Aside from my own font, I see that the punctuation and similar characters don't show up for Chicago, Times, Times New Roman, Helvetica, and Tahoma. Perhaps something was not installed properly? Would an image or screenshot comparing two different fonts work? $\endgroup$
    – iwantmyphd
    May 27, 2014 at 21:38
  • 3
    $\begingroup$ Many (if not all) of the characters you mention are termed "spanning characters". In the Mathematica fonts they are represented by multiple glyphs. Mathematica does this so that it can create typesetting effects like brackets that span the whole vertical dimension of 2D text. Since this is an implementation detail, I do not think you can easily replace them in your own font. $\endgroup$ May 27, 2014 at 21:49
  • $\begingroup$ @ChristopherCole Interesting, I can see how those reserved characters like {} [] and so forth might need to remain unchanged because they have functional purposes beyond simple text. Given that when these characters are inside of quotations "", and therefore set to be rendered as text rather than functional characters, shouldn't that allow for them to be changed to the proper font? I did notice that one could get the " or ' or , to work when a forward slash is put immediately before it. Is there a similar convention that allows those remaining characters to be identified as only text? $\endgroup$
    – iwantmyphd
    May 27, 2014 at 23:23
  • 3
    $\begingroup$ Strongly relevant thread: "How to avoid font substitution with Mathematica fonts?" $\endgroup$ May 28, 2014 at 10:13

1 Answer 1

5
$\begingroup$

Alexey Popkov was right in his comment, see "How to avoid font substitution with Mathematica fonts?": https://mathematica.stackexchange.com/a/18980/280

Even though in the Mathematica help files you may not find "OperatorSubstitution" anywhere, but if you add

BaseStyle -> {PrivateFontOptions -> {"OperatorSubstitution" -> False}}

within your code, this appears to fix it for any non-alphanumeric symbol you might have.

EDIT: This also appears to work with version 9.0.0-9.0.1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.