User Tools

Site Tools


builders:sign

Sign

This is an item of class 54. You can use Fiddle>Create Object or Duplicate object to get one.

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

Use Fiddle > Modify object to get at 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.

e.g.

  • #finkfree#c9##Wowzers!
  • #fgillsansbonova#a0#c17#r33##Hello World

Fonts available.

Specifying a font of “1”, “2”, “3”, “4” or “5” will use a simple text font, where the number roughly indicates the size required, 1 being smallest and 5 being largest. If you use this, the 's', 'r' and 'a' parameters are not used. This is most useful for small text where TTF fonts do not scale well.

Otherwise you may specify the name of a supported font. An up-to-date list is available by clicking List of fonts installed - do not include '.ttf' when specifying.

Notes-

  • Some fonts simply don't work. These are mostly 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.
  • 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.
  • Fix orientation to 0 for normal text; 1 for backwards text!

BUGS:

  • Non-ASCII characters probably won't work.
  • On clicking “Set” sometimes an old version of the text field is displayed. click another field then click back.
builders/sign.txt · Last modified: 2022/08/28 23:23 by amanda