Re: LANG: Text in VRML

Chris Marrin ([email protected])
Fri, 24 Feb 95 15:28:22 -0800


> As far as 2D text is concerned, do we want to have a common library of
> gifs/ppms/tiffs/jpegs/??? which can be (perhaps in a commonly created and
> shared library) concatenated into texture maps which can then be applied to
> polygons? Is this too much work? (Features like kerning and leading
> probably are.)
>
> If we agree on a common library of 3D shapes for letters, in both serif and
> sans serif fonts, this could quickly solve the implementation problem. This
> would require *no* extensions to VRML itself, but rather algorithms in the
> VRML generators which can spit out and correctly scale a string of 3D text.

I think we really need direct support of text strings in VRML. There are lots
of implementations that can work on the various platforms. Virtually all
systems today have some sort of outline font support. Once you can get the
outline for a glyph, it's just a polygon and can be easily put in a 3D world.
Alternatively, an implementation can generate 2D text in a buffer and texture
a polygon (if that's fast enough). A simple implementation would be to grab
the public domain Hershey Fonts and use those in a stroke font implementation.
I don't think kerning, leading or any other typographical curiousity is nearly
as important as getting text over a doorway or on a billboard.

Perhaps some kind soul would like to take the Hershey fonts and build then into
a simple stroke text library for VRML. It would be hard and unless things have
changed Hershey fonts are public domain and royalty free.

As fas as actual font specifications go, this can be an implementation issue,
too. I like HTML's way of specifying "font bundles" in the form of things like
HEADING, BLOCKQUOTE, PREFORMATTED, etc. This way each viewer can do what is
best/easiest.

>
> What about text formatting? It seems reasonable that we should recapitulate
> all of HTML's features (as heinous as that may sound, they *are* a standard)
> into any text formatting that VRML can do. And there's a fair amount of
> public domain source code which can help people get up to speed on this.

I would like to see an initial implementation where we just have a Text node
(similar to SoText3 in Inventor) and a Font node (following in some way the
HTML method of specifying Font). I can see one day fully supporting HTML as a
VRML node but I think that should wait a bit...

-- 
chris marrin                     ,,.                        
Silicon Graphics, Inc.        ,`` 1$`
(415) 390-5367             ,|`   ,$`
[email protected]           b`    ,P`                           ,,.
                        mP     b"                            , 1$'
        ,.`           ,b`    ,`                              :$$' 
     ,|`             mP    ,`                                             ,mm
   ,b"              b"   ,`                ,mm      m$$    ,m          ,,`P$$
  m$`             ,b`  .` ,mm          ,.`'|$P   ,|"1$`  ,b$P       ,,`   :$1
 b$`             ,$: :,`` |$$       ,:`    $$` ,|` ,$$,,`"$$      .`      :$|
b$|            _m$`,:`    :$1    ,:`      ,$Pm|`    `    :$$,..;"'        |$:
P$b,      _;b$$b$1"       |$$ ,,``       ,$$"             ``'             $$
 ```"```'"    b$P         `""`           ""`                             ,P`
             `"`                                              '$$b,,...-'

"As a general rule, don't solve puzzles that open portals to Hell." - excerpt from "A Horror Movie Character's Survival Guide"