Brian Furtaw (brian++at++sgi.com)
Thu, 14 Nov 1996 15:25:39 -0500
Take a look at pfString that what perfly uses to do its titles, heres how
(from perfly.C)
pfFont *fnt;
pfString *str;
pfLight *lt;
pfMatrix mat;
pfFrustum *frust;
const pfBox *bbox;
float dist;
double start, t;
fnt = pfdLoadFont_type1(ViewState->objFontName, ViewState->objFontType);
if (!fnt)
return;
pfPushState();
pfPushIdentMatrix();
str = new(NULL) pfString;
str->setMode(PFSTR_JUSTIFY, PFSTR_MIDDLE);
str->setFont(fnt);
str->setColor(1.0f, 0.0f, 0.8f, 1.0f);
str->setString(ViewState->welcomeText);
I think that difference between 2d and 3d fonts is probably the draw style,
(from the pfText man page)
/* Initialize Performer and create pfScene "scene" */
/* Get shared memory arena */
arena = pfGetSharedArena();
/* Append standard directories to Performer search path, PFPATH */
pfFilePath(".:/usr/share/Performer/data");
/* Create 3D message and place in scene. */
text = new pfText;
scene->addChild(text);
if (pfFindFile("Times-Elfin.of", path, R_OK))
{
str = new pfString;
look draw style====> str->setMode(PFSTR_DRAWSTYLE,
PFSTR_EXTRUDED);
str->setMode(PFSTR_JUSTIFY, PFSTR_MIDDLE);
str->setColor(1.0f, 0.0f, 0.8f, 1.0f);
str->setString("Welcome to IRIS Performer");
I have not however been able to find a list of Drawstyle options to confirm
this theory. I don't know where the fonts come from. Hope this helps,
Brian
On Nov 14, 10:10am, SCOTT OFRIEL wrote:
> Subject: Nobody knows 2D fonts??
> Hello Performer Friends:
>
> I would like to attach some labels to a graph. This is just a 2D graph so I
> do not need 3D fonts. How do I go about using pfText? The documentation is
> not clear. On pg. 114 of the Performer Programming guide it lists pfText as
a
> Leaf node that renders 2D and 3D text. I would prefer not to use the 3D text
> for performance reasons.
>
> In addition, what fonts can I use?
>
> Thanks kindly, Scott O'
>
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from SCOTT OFRIEL
-- o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-oBrian Furtaw (brian++at++sgi.com) VisSim Technical Consultant 12200-G Plum Orchard Drive Office: (301)572-3293 Fax: (301)872-3293 Silver Spring, Maryland 20904 OpenGL/ImageVision/OpenInventor/Performer ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:57 PDT