From: Darren D. <dd...@co...> - 2006-01-24 13:21:38
|
On Monday 23 January 2006 18:27, Robert Kern wrote: > Darren Dale wrote: > > I would like to ask for some advice from those out there who have > > experience dealing with fonts and text layout. > > > > At the end of this message is the output of dvitype, which translates a > > dvi file (in this case a file typesetting "0.8" in ptmr7t fonts) into > > human readable output. I have considered writing a dvi parser for mpl, > > intending to extract the information necessary to render text with mpl's > > existing font and text support. There is some more information at > > http://en.wikipedia.org/wiki/DVI_(TeX) and > > http://www.math.umd.edu/~asnowden/comp-cont/dvi.html#setchar. > > > > Is this worth pursuing? If I could make it work, mpl's only external > > dependency would be TeX/LaTeX, even dvipng would not be required. > > Quite probably. dvitype is new to me. Doing a DVI interpreter for mpl and > Chaco has been on my list of things to look at for some time. The things > stopping me (besides the density of the DVI standard) was that all of the > readable code I found for interpreting DVI files has been GPLed. > > You will need to access the parameters defined in the TeX Font Metric > files, I think. I recommend using tftopl(1) to convert them to a parseable > form. How does matplotlib render glyphs, does it use freetype? Would matplotlib be able to render tex's fonts with the existing codebase, or would I have to delve into metafont? |