s-news
[Top] [All Lists]

changing fonts in postscripts

To: "S_question (E-mail)" <s-news@lists.biostat.wustl.edu>
Subject: changing fonts in postscripts
From: "Prins, N.H. (Klaas)" <klaas.prins@organon.com>
Date: Wed, 23 Oct 2002 16:27:20 +0200
I'm trying to get a feel on how to change fonts in postscripts.
For this I would like to display all fonts in the ps.option()$fonts vector
on a single page. Here's the code of what I felt should do it, but all I got
was 35 lines with names in ps.options()$fonts printed, and only the standard
font had been used. I tried ps.options, ps.options.send, practically
everything, all without success. 

ps.options(reset=T)
ps.options(paper="A4")
postscript("C:\\temp\\ShowPsFonts.fig",horizontal=F)

plot(1:10,1:10,type="n",axes=F,xlab="",ylab="")
 for(i in 1:35)
# 35 fonts in ps.optionts()$fonts
 {
  ps.options.send(font=i)
# this is where I change the font
  text(5,10-i/3.5,paste("This is postscript font",ps.options()$fonts[i],"->
number",i),col=41) # col=41 = black
 }
dev.off()

Perhaps the hmisc library has this functionality covered but I would be
interested to be able to do without it as well.
Thanks in advance,
Klaas


--------------------------------------------------------------------
This message, including attached files, may contain confidential
information and is intended only for the use by the individual
and/or the entity to which it is addressed. Any unauthorized use,
dissemination of, or copying of the information contained herein is
not allowed and may lead to irreparable harm and damage for which
you may be held liable. If you receive this message in error or if
it is intended for someone else please notify the sender by
returning this e-mail immediately and delete the message.
--------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>
  • changing fonts in postscripts, Prins, N.H. (Klaas) <=