Subscribe Bookmark RSS Feed

Scene Box text font

eigenmetricsoli

Community Trekker

Joined:

Jun 26, 2014

Does anyone know how to specify the font in a scene box?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

JMP's SceneBox uses the preference for Text Font for the text; you can specify it like this (taken from HelloWorld.jsl example):

Preferences( Fonts( English( Text Font( "Rockwell" ) ) ) );

greeting = Scene Display List();

greeting << color( .3, .9, .9 ); // .1,.1,.1 = almost black    .9,.9,.9 = almost white

greeting << Text( center, middle, .3, "Hello 3D World" );

Scene = Scene Box( 600, 600 );

Scene << backgroundcolor( 0 ); // black=0, gray=1, white=2

Scene << showarcball( always );

New Window( "x", Scene );

Scene << perspective( 45, .2, 20 );

Scene << Translate( 0.0, 0.0, -4.5 );

Scene << arcball( greeting, 1.5 );

Scene << update;

7141_HelloWorld.png

Only one font choice, but as many sizes and colors as you need.

Craige
2 REPLIES
Solution

JMP's SceneBox uses the preference for Text Font for the text; you can specify it like this (taken from HelloWorld.jsl example):

Preferences( Fonts( English( Text Font( "Rockwell" ) ) ) );

greeting = Scene Display List();

greeting << color( .3, .9, .9 ); // .1,.1,.1 = almost black    .9,.9,.9 = almost white

greeting << Text( center, middle, .3, "Hello 3D World" );

Scene = Scene Box( 600, 600 );

Scene << backgroundcolor( 0 ); // black=0, gray=1, white=2

Scene << showarcball( always );

New Window( "x", Scene );

Scene << perspective( 45, .2, 20 );

Scene << Translate( 0.0, 0.0, -4.5 );

Scene << arcball( greeting, 1.5 );

Scene << update;

7141_HelloWorld.png

Only one font choice, but as many sizes and colors as you need.

Craige
eigenmetricsoli

Community Trekker

Joined:

Jun 26, 2014

That works, thanks!