Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Forcing Mathematica to use standard fonts

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111491] Re: Forcing Mathematica to use standard fonts
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Tue, 3 Aug 2010 06:38:06 -0400 (EDT)

If you can reproduce the problem with Acrobat Reader, send me an example
and I'll run it down.  But if the problem is only reproducible with
Illustrator, I'm afraid there's not much I can do.

One would certainly think that since Adobe made both the PDF specification
and the reference PDF renderer, that it ought to be a slam dunk for
Adobe to embed a full importer into Illustrator.  Maybe.

But I know from hard experience that another format which Adobe invented,
EPS, is *not* fully supported for import into Illustrator.  Perhaps not
coincidentally, one of the big areas of breakage we know about is font
embedding.  The docs clearly indicate that they support a subset of EPS,
but I haven't been able to find *which* subset.  So, Mathematica EPS
tends to be broken when imported into Illustrator.

Quite possibly, the same is true with PDF.  I don't know and I
haven't tried it.  But if that is the case, I can't consider it a bug.
We're not disinterested in supporting Illustrator, but it must be noted
that supporting Illustrator is *not* the same as supporting EPS or,
possibly, PDF.  It's more like a new export format.  And if we decided
to do support this new format, I'm not sure the information we need is
available to do so properly.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.

On Mon, 2 Aug 2010 07:05:10 -0400 (EDT), Uayeb wrote:
> A related problem (which was my guess as to why this question was
> posed in the first place) is how does one deal with the Mathematica
> fonts embeded into PDF files of plots saved/Exported from Mathematica.
>
> Opening a PDF in e.g. Adobe Illustrator gives an error Font
> "Mathematica2" not found, or something similar.
>
> I then installed the Mathematica Fonts on my system (from
> http://support.wolfram.com/technotes/fonts/windows/latestfonts.html).
> This eliminates the error, but the glyphs are still not correct. (e.g.
> a lowercase sigma becomes capital sigma, some characters are replaced
> by a box with an "x" in it, etc)
>
> Of course a strategy such as that suggested with "PrivateFontOptions"
> is helpful, but breaks down again as soon as one incorperates a greek
> letter...
>
> Cheers,
> Andy Green
>
> PS Actually, I find the structure of PDF files exported from
> Mathematica infuriating, not to mention the (seeming) considerable
> inconsistencies in how they are exported. But that's a discussion for
> another thread.
>
> On Jul 28, 4:54 pm, John Fultz <jfu... at wolfram.com> wrote:
>> If what you're exporting is really text with no embedded math, then you
>> c==
> an use
>> TextCell...
>>
>> Graphics[{Style[
>> Text[TextCell["The (quick+brown) fox ==== the lazy-dog"], {0, 0}==
> ],
>> FontFamily -> "Times"]}]
>>
>> This will also fix various other things like the line-wrapping behavior
>> t==
> o be
>> more appropriate for straight text.
>>
>> If you have embedded math, but still don't want to use the Mathematica
>> fo==
> nts,
>> you can use the "OperatorSubstitution" option, which I've mentioned a
>> few==
> times
>> before in this group:
>>
>> Graphics[{Style[Text["The (quick+brown) fox ==== the lazy-dog", {0, 0}]=
==
> ,
>> FontFamily -> "Times",
>> PrivateFontOptions -> {"OperatorSubstitution" -> False}]}]
>>
>> In both cases, Mathematica fonts will still be used for things like
>> Greek
>> characters and special mathematical symbols, but they won't be used for
>> r==
> outine
>> operators such as (){}[]#+====-*/, which I think is what you're mainly =
==
> interested
>> in.
>>
>> Sincerely,
>>
>> John Fultz
>> jfu... at wolfram.com
>> User Interface Group
>> Wolfram Research, Inc.
>>
>> On Tue, 27 Jul 2010 07:53:00 -0400 (EDT), Greg Egan wrote:
>>> Suppose I embed some text in a graphic using:
>>>
>>> Style[
>>> Text["The (quick+brown) fox ==== the lazy-dog", coords],
>>> FontFamily->"Times"]
>>>
>>> If I export this graphic (e.g. to PDF or SVG), Mathematica will put
>>> most of the text in Times, but the characters "(+)====-" will all be ==
> in
>>> special Mathematica fonts, generally with their own special encodings.
>>>
>>> I appreciate that Mathematica has good reasons for substituting its
>>> own fonts when it typesets mathematical expressions, but in some
>>> situations I'd like to be able to create output that uses only
>>> standard fonts.
>>>
>>> Is there any way to force Mathematica to stop this character-by-
>>> character font-substitution, and output all characters unchanged in a
>>> single, specified font?  There's a tantalising claim in the
>>> documentation (tutorial/TextAndFontOptions):
>>>
>>> "For a given text font, Mathematica tries to choose the special
>>> character font that matches it best. You can help Mathematica to make
>>> this choice by giving rules for "FontSerifed" and "FontMonospaced" in
>>> the setting for the FontProperties option. You can also give rules for
>>> "FontEncoding" to specify explicitly from what font each character is
>>> to be taken."
>>>
>>> ... but there's no proper documentation of this feature, if it even
>>> still exists in v7; the documentation for FontProperties warns that
>>> "This function has not been fully integrated into the long-term
>>> Mathematica system, and is subject to change."
>>>
>>> Thanks for any help people can offer.



  • Prev by Date: Re: ReplaceAll and ReplaceRepeated Strange Behavior
  • Next by Date: Re: A distribution problem using Mathematica
  • Previous by thread: Re: Forcing Mathematica to use standard fonts
  • Next by thread: Re: Mathematica and uniform distributions