+signs_lib.register_sign("foo:my_cool_sign", {
+ description = "Wooden cool sign",
+ inventory_image = "signs_lib_sign_cool_inv.png",
+ tiles = {
+ "signs_lib_sign_cool.png",
+ "signs_lib_sign_cool_edges.png"
+ },
+ number_of_lines = 2,
+ horiz_scaling = 0.8,
+ vert_scaling = 1,
+ line_spacing = 9,
+ font_size = 31,
+ x_offset = 7,
+ y_offset = 4,
+ chars_per_line = 40,
+ entity_info = "standard"
+})
+
+* default def assumes a wallmounted sign with on-pole being allowed.
+
+*For signs that can't support onpole, include in the def:
+ allow_onpole = false,
+
+* "standard" entity info implies the standard wood/steel sign model, in
+ wallmounted mode. For facedir signs using the standard model, use:
+
+ entity_info = {
+ mesh = "signs_lib_standard_wall_sign_entity.obj",
+ yaw = signs_lib.standard_yaw
+ },
+
+]]--
+
+function signs_lib.register_sign(name, rdef)
+ register_sign(name, rdef)
+
+ if rdef.allow_widefont then
+
+ wdef = table.copy(minetest.registered_items[name])
+ wdef.groups.not_in_creative_inventory = 1
+ wdef.horiz_scaling = wdef.horiz_scaling / 2
+
+ register_sign(name.."_widefont", wdef)
+ end