[Tikzdevice-bugs] Arial and Other Things

Charlie Sharpsteen chuck at sharpsteen.net
Tue Jul 27 01:15:15 CEST 2010


Another factor that may be coming into play is font metric caching.  For
example, the string:

"3\\cdot10^{-6}"

Looks the same to the metrics cacher regardless of the font being used- so
you may be getting output typeset in Helvetica that is using cached metrics
that were calculated for Computer Modern.  Try setting:

  options( tikzMetricsDictionary = NULL )

Before loading the tikzDevice and see if it has any effect.

-Charlie

On Mon, Jul 26, 2010 at 3:55 PM, Cameron Bracken
<cameron.bracken at gmail.com>wrote:

> That is likely happening happening because what I gave you changes the
> font after character metrics are calculated.   The following is a much
> better option:
>
> setTikzDefaults()
>
> options(tikzLatexPackages=c(getOption("tikzLatexPackages"),'\\renewcommand{\\rmdefault}{phv}\n'))
>
> just call these before your plot. Charlie is also right that some
> other issues with font metrics were solved in 0.5 that also might
> affect the placement of exponents.
>
> -Cameron
>
>
>
> On Mon, Jul 26, 2010 at 4:12 PM, Lorenzo Isella
> <lorenzo.isella at gmail.com> wrote:
> > Hi Cameron,
> > And thanks for your suggestion. However, I am experiencing a problem:
> > when I redraw the figure (i.e. pdflatex tex file with the tikzpicture
> > wrapped up in the lines you gave me) there are some slight modifications
> > (e.g. in 10^3 the "3" moves too close to the "10") that spoil the plot.
> > I am using ggplot2+tikzDevice 0.4.8 (font size branch) and I wonder if
> > any latest version of tikzDevice would solve the problem.
> > I can try to provide you with a minimal example if needed.
> > Cheers
> >
> > Lorenzo
> >
> >
> >
> > On Mon, 2010-07-26 at 13:03 -0600, Cameron Bracken wrote:
> >> > Again I am not really reporting a bug but rather asking a question
> about
> >> > tikzDevice,
> >>
> >> The name is a bit misleading but this is certainly the best place to
> >> reach both us as you have found. :)
> >>
> >> >namely how can I select arial as the font in a standalone
> >> > figure generated via tikzDevice?
> >>
> >> wrap the tikzpicture in:
> >>
> >> {\fontfamily{phv}\selectfont
> >> ....
> >> }
> >>
> >> This actually selects helvetica but who can tell the difference anyway?
> ;)
> >>
> >>
> >>
> >> >
> >> > And finally, (sorry for being annoying) is tikzDevice 0.5 going to be
> >> > release before September?
> >>
> >> Highly likely.
> >>
> >> -Cameron
> >
> >
> >
>


More information about the Tikzdevice-bugs mailing list