From ihaka@stat.auckland.ac.nz  Sat Apr  8 02:38:41 2000
From: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Sat, 8 Apr 2000 13:38:41 +1200
Subject: [Rd] Re: [R] MetaPost device?
In-Reply-To: <87d7o2hsi8.fsf@bavaria.ece.cmu.edu>; from Thomas J Vogels on Fri, Apr 07, 2000 at 10:53:35AM -0400
References: <005501bf9fd8$2697d420$9570fe8c@lucent.com> <x2ya6r2qea.fsf@blueberry.kubism.ku.dk> <20000406182908.A19743@sirio.stat.unipd.it> <20000407100231.A2998@stat1.stat.auckland.ac.nz> <87d7o2hsi8.fsf@bavaria.ece.cmu.edu>
Message-ID: <20000408133841.B1234@stat1.stat.auckland.ac.nz>

On Fri, Apr 07, 2000 at 10:53:35AM -0400, Thomas J Vogels wrote:
> 
> Ross Ihaka <ihaka@stat.auckland.ac.nz> writes:
> 
> > On Thu, Apr 06, 2000 at 06:29:08PM +0200, Guido Masarotto wrote:
> > 
> > >   The problem with MetaPost (if I understand well) is how
> > >   you do get metric information about the fonts. 
> > 
> > The metric info problem is what stoped me writing the XFig driver.
> > Which metrics do you use for Times-Roman for example -- the X11 metrics
> > or the PostScript metrics?
> 
> I'll be sorry for this naive question, but if you limited the fonts
> in the FIG output to LaTeX fonts, couldn't you use the LaTeX font
> information?  (This doesn't solve the problem that what you see in an
> X11 device is not what you get with dev.print which may or may not be
> a good thing.)

This is supposing that you can get get access to it.  I certainly don't
know enough about TeX to be able to parse tfm files.  If code existed to
compute the dimensions of strings then we'd be away.

Another problem the text output by TeX can be rather richly structured
-- kerning and glue come to mind.  I think a general solution might
require either writing a version of the TeX layout code for R, or running
TeX to compute metric information whenever a string is placed in a plot
(hmmmm actually this last might just be workable - if a little slow).

	Ross
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Re: [R] MetaPost device?
Ross Ihaka