Re: width in ASCII text.

Chris Marrin ([email protected])
Thu, 30 Nov 1995 15:45:15 -0800


On Nov 30, 11:56am, Tim Bray wrote:
> Subject: Re: width in ASCII text.
> ...
>
> From the point of view of a world constructor, it seems pretty essential
> to be sble to supply a string, a set of dimensions, and rely on the
browser
> to make sure it's legible within those constraints. YON's
interpretation
> of width makes this at least possible. If 'width' isn't useful
> for this, some other mechanism needs to be provided.
>...

For argument's sake let's call Jan's proposed field gmaxWidth" to
distinguish it from what my original proposal called for. These 2 fields
are pretty analogous to the difserent types of justification in a word
processor. When you set "ragged right" justification the text always
remains shorter than the set width. When you set "full" justification
characters fit exactly betwesn the right and left margins.

I would propose adding a gmaxWidth" field to the new Text node. It would
be an SFFloat and would define the maximum width of all lines in the
MFString. This would define an enclosing rectangle for the text, with
maxWidth being the width and (string.length() * size) being the height.
Note that these notions assume a text direction of LEFT and would be
flipped for UP and DOWN directions.

I would still like to keep my notion of an array of widths. This allows
"full justification" and more accurate typography.

-- 
chris marrin      Silicon      http://www.sgi.com/Products/WebFORCE/WebSpace
(415) 390-5367    Graphics     http://reality.sgi.com/employees/cmarrin_engr/
[email protected]   Inc.         

"It is well to remember that the entire universe, with one trifling exception, is composed of others." - John Andrew Holmes


  • Next message: Adrian Scott: "!exec view_source"
  • Previous message: Cranz Gregory: "RE: PHIL: converter from VRML(IV) to dx"