Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

Re Text in graphics

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Re Text in graphics
  • From: twj
  • Date: Sun, 27 Sep 92 10:12:30 CDT

>Is it possible to use multiple fonts in some texts in graphics?

The answer is yes, sort of.   
I have been thinking about writting a package which will do this.  
Since it always seems to take me time to actually produce things 
I thought I would publish my method.  Maybe one of you characters
could expand on it or at the least you may be able to use this to
solve some of your problems.

This is an example which will give you one-dimensional
text string with mixed fonts.

string =
" gsave \n
  0.1 0.5 moveto \n
  /Times-Roman findfont .05 scalefont setfont \n
  (Sin\\( ) show \n
  /Symbol findfont .05 scalefont setfont \n
  (f) show \n
  /Times-Roman findfont .05 scalefont setfont \n
  (\\)) show \n
  grestore \n
"
Then something like

Plot[ Sin[x], {x,0,2Pi}, Epilog -> PostScript[ string]]

will produce a label with Sin( phi) 
The coordinate system which is being used is the normal coordinate
system which goes from <0,0> to <1, asp> across the window
into which your coordinates are drawn ie the PlotRange of your
picture.

This has some enormous deficiencies but the basic idea can be expanded
on.  I stress that this is NOT a solution to the problem but some ideas
about how to implement a solution.

Tom Wickham-Jones
WRI







  • Prev by Date: Econometrics
  • Next by Date: Alternative Mma front ends?
  • Previous by thread: Econometrics
  • Next by thread: Alternative Mma front ends?