[JIRA] Issue Comment Edited: (SVC-4715) llRenderText - Rendering Text on a Prim

Reynard Baroque (JIRA) no-reply at lindenlab.cascadeo.com
Mon Jan 11 18:31:32 PST 2010


    [ http://jira.secondlife.com/browse/SVC-4715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158682#action_158682 ] 

Reynard Baroque edited comment on SVC-4715 at 1/11/10 6:30 PM:
---------------------------------------------------------------

I  like this idea a lot; the only nit I have to pick is with the option for justification. It needs to be able to justify vertically as well as horizontally; i.e., the scripter should able (within reason) be able to specify whether the text starts at the top, the bottom or the middle of the face it's being rendered on.

So to expand on the OP's submission, I suggest the Justification parameter be implemented as bit flags, so they could be passed simultaneously:
{noformat}
TEXT_JUSTIFY_LEFT	0x01
TEXT_JUSTIFY_RIGHT	0x02
TEXT_JUSTIFY_CENTER	0x04
TEXT_JUSTIFY_FULL	0x08

TEXT_JUSTIFY_TOP	0x10
TEXT_JUSTIFY_BOTTOM	0x20
TEXT_JUSTIFY_MIDDLE	0x40
{noformat}

This would require that the internal coding of the function check the flags to ensure things like left-justified and centered cannot be selected simultaneously.

As far as fonts go, I would suggest the use of [Open Type|http://en.wikipedia.org/wiki/OpenType] fonts rather than TrueType or PostScript fonts due to Unicode support, among other things. I think the following list should be supported at minimum:
* Arial  (a proportional sans-serif font)
* Times New Roman (a proportional serif font)
* Lucida Console (a monospaced sans-serif font)
* Courier New (a monospaced serif font)

I also think there should be a symbol or wingdings font and a calligraphic/handwriting font, but I'm not really sure what. I'll edit this post later when I've had a chance to do some comparisons and find out which fonts come standard with different versions of Windows, OSX and a couple of Linux distros

      was (Author: Reynard Baroque):
    I  like this idea a lot; the only nit I have to pick is with the option for justification. It needs to be able to justify vertically as well as horizontally; i.e., the scripter should able (within reason) be able to specify whether the text starts at the top, the bottom or the middle of the face it's being rendered on.

So to expand on the OP's submission, I suggest the Justification parameter be implemented as bit flags, so they could be passed simultaneously:
{noformat}
TEXT_JUSTIFY_LEFT	0x01
TEXT_JUSTIFY_RIGHT	0x02
TEXT_JUSTIFY_CENTER	0x04
TEXT_JUSTIFY_FULL	0x08

TEXT_JUSTIFY_TOP	0x10
TEXT_JUSTIFY_BOTTOM	0x20
TEXT_JUSTIFY_MIDDLE	0x40
{noformat}

This would require that the internal coding of the function check the flags to ensure things like left-justified and centered cannot be selected simultaneously
  
> llRenderText - Rendering Text on a Prim
> ---------------------------------------
>
>                 Key: SVC-4715
>                 URL: http://jira.secondlife.com/browse/SVC-4715
>             Project: 2. Second Life Service - SVC
>          Issue Type: New Feature
>          Components: Scripts, Simulation
>            Reporter: Sebastean Steamweaver
>
> This is an old idea, and I used a function name I found mentioned in a related JIRA: VWR-2493
> As a note, it's been suggested that this could be achieved through SVG - vector font formats.
> It's also something badly needed. However, I would prefer to see this in a dedicated function rather than a new prim type, which I think limits its uses, or something which changes the current operation of existing functions. In light of such, I'm creating this request for text on a prim side.
> *llRenderText* ( {{string}} _Text_, {{integer}} _Face_, {{integer}} _Horizontal_, {{float}} _Rotation_, {{float}} _Size_, {{integer}} _Font_, {{integer}} _Justification_, {{vector}} _Font_Color_, {{float}} _Font_Alpha_)
> *llRenderLinkText* ( {{integer}} linknumber, {{string}} _Text_, {{integer}} _Face_, {{integer}} _Horizontal_, {{float}} _Rotation_, {{float}} _Size_, {{integer}} _Font_, {{integer}} _Justification_, {{vector}} _Font_Color_, {{float}} _Font_Alpha_)
> *Text*: The text to be displayed, limited to 1024 characters in total (which is then limited based on size of font).
> *Face*: The face of the prim the text is rendered on.
> *Horizontal*: This is a boolean. If TRUE, the text is rendered horizontally. If FALSE, the text is rendered vertically.
> *Rotation*: Specifies the angle at which the text is rendered - units in Radians. This is mainly so you can determine which axis your text is rendered on and is more flexible than an X/Y boolean.
> *Size*: Specifies the size of the font. More specifically, how much space a character can take on the face of the prim. This will affect how much of the text is truncated during rendering (larger font = less space for characters).
> *Font*: Specify a font via a set of constants using the basic types, such as FONT_TIMES_NEW_ROMAN, or FONT_COURIER, etc. I'd suggest about 4 or 5 fonts.
> *Justification*: Like font, this would be a set of constants to define the alignment of text: TEXT_JUSTIFY_LEFT, TEXT_JUSTIFY_RIGHT, and TEXT_JUSTIFY_CENTER
> *Alpha*: Set the alpha of the font overlaying the prim face.
> _Important_Notes_:
> * Text would be rendered and wrapped to the current size of the prim.
> * Effectively, with a 1024 character message, up to a point all 1024 characters can be rendered, but after that point, characters will be truncated to  wrap the text to the prim face.
> Why this is needed:
> # Many, many, many objects everywhere in world, from HUDs, to Contest boards, to RSS Feed displays, to personalization scripts - the uses are everywhere, you probably can't move around in a sim without seeing *at least* one in most places - have to use very tedious means of rendering text for generally simple things like names and messages which uses a lot of prims, and in many cases, several scripts, and many textures.
> # This has been a long requested, and much more importantly, long *needed* feature.
> # llSetText is unsuitable for most of these use cases because it does not scale with resolution and thus appears very different on different screens, it does not retain perspective, it is not viewable at a distance, It floats through walls due to being a client-rendered effect like particles, and it can be generally ugly to look at anyway.
> Please vote for this and share this with your friends if you view this as important as I do.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.secondlife.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the Jira-notify mailing list