1
$\begingroup$

Consider a simple plot with text:

Show[Plot[x^2, {x, 0, 10}], Graphics[Text[Style["some text", Large], {4, 10}]]]

The plot on Mathematica 11 and the pdf

You can see Mathematica's output on the left and the pdf obtained through "Save Graphic as" on the right (as shown in Preview on Mac OS Mojave, but using Acrobat Reader is the same). Clearly the font in the pdf looks different (kind of bold). I didn't have this problem with the previous version of Mathematica.

Is there any way to render the font in the pdf as it appears in Mathematica's output?

$\endgroup$
1
  • 1
    $\begingroup$ @Szabolcs Thanks for pointing this out. It's indeed the same problem (and it's a problem with Mojave, and the workaround proposed there works fine) $\endgroup$
    – Maiaux
    Commented Dec 9, 2018 at 11:35

1 Answer 1

0
$\begingroup$

Try:

Show[Plot[x^2, {x, 0, 10}], 
 Graphics[Text[
   Style["some text", Large, FontFamily -> "Times"], {4, 10}]]]

or

Plot[x^2, {x, 0, 10},
 Epilog -> 
  Text[Style["some text", Large, FontFamily -> "Times"], {4, 10}]]

A request: Do not include irrelevant code in questions, such as "y = x^2" when "x^2" suffices.

$\endgroup$
1
  • $\begingroup$ I edited the question as requested. However your fix doesn't work: it just changes the font family both in Mathematica's output (so I guess Mathematica's default is not "Times") and in the exported pdf, but the latter still looks bold wrt the former. $\endgroup$
    – Maiaux
    Commented Dec 9, 2018 at 11:29

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