Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!data.nas.nasa.gov!mustang!nntp-server.caltech.edu!sol1.gps.caltech.edu!CARL From: carl@sol1.gps.caltech.edu (Carl J Lydick) Newsgroups: comp.lang.postscript Subject: Re: How to center a string with different fonts? Message-ID: <1991Jun19.114522.21273@nntp-server.caltech.edu> Date: 19 Jun 91 11:45:22 GMT References: <9106180838.AA21008@autarch.acsu.buffalo.edu> Sender: news@nntp-server.caltech.edu Reply-To: carl@sol1.gps.caltech.edu Organization: HST Wide Field/Planetary Camera Lines: 16 In article <9106180838.AA21008@autarch.acsu.buffalo.edu>, xiaofei@ACSU.BUFFALO.EDU (XiaoFei Wang) writes: >I know how to center a string. >Now the question is: > >Since it is not possible to make a string of >different fonts, how do I center something like >``TlambdaNarrowup'' ? The question comes when I print >a graph lable. OK, this can be done by >print ``T_N_'' first and then print ``_lambda_arrowup'' >where ``_'' denotes space. But then how do you center >``T[sub]lambdaN[sup]arrowup''? You compute bounding boxes for each of the single-font strings, use these to compute the overall bounding box, and use that information for centering. -------------------------------------------------------------------------------- Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL