User Tools

Site Tools


builders:sign

This is an old revision of the document!


Sign

This is an item of class 54.

(Create a knicknack and then fiddle>Modify object to set classNumber to 54.)

This object will dynamically create a string of text based upon the value you enter in the 'text' field !

The field can be a simple string, but can also be prefixed by the following -

#cn Sets the text to this color. If you want to use the value in colorMap, specify #c239
#bn Sets the background color. If you want to use the colorMap, specify #c240
#sn Sets point size
#fsss Sets font to use (see below)
#an Sets antialiasing off(0) or on(1)
#pn Adds background padding around text (useful for some fonts to avoid clipping descenders etc.)
#rn Rotate text -90 to 90
## Marks end of options, following is text to display.

This works by dynamically generating an img file for your text string at runtime. The imageURL will be substituted with “sign.nnnn.img” where nnnn is a (hopefully) unique value for each text string.

Fonts available.

List of fonts installed - do not include '.ttf' when specifying

Notes-

  • Some fonts simply don't work. These are just a dump from my PC; let me know if you have issues, or want any adding.
  • An error in your string may cause either a default version, or nothing, to be displayed.
  • In the latter case, use Fiddle>Modify Object and choose your sign from the left list to adjust.
  • Rotations > 90 don't seem to work even though they should :(
  • Different fonts behave differently w.r.t scaling, antialiasing and rotations.
  • Non-ASCII characters probably won't work.
  • Don't touch imageURL or imageVersion - On Signs, these are set dynamically at runtime by the server.
  • Using the generated imageURLs (sign.*.img) on other objects is currently discouraged as they are only generated when a sign is requested, and I can see that there will be a need to purge unused ones..
  • If you want to use the same text just in different colors, set #c to 239 and use the same exact value in 'text', and use colorMap as normal. This will reduce load on the server generating images.

BUGS:

  • BUG: background fill isn't working yet.
  • On clicking “Set” sometimes an old version of the text field is displayed. click another field then click back.
builders/sign.1661022079.txt.gz · Last modified: 2022/08/20 19:01 by amanda