Skip to main content

title

The title macro adds a title to a pattern part.

It is provided by plugin-annotations, which is part of core-plugins (so it is available by default).

Signature

macro('title', {
String align = 'left',
Boolean append = false,
Point at,
String brand = 'FreeSewing',
Boolean cutlist = true,
Number dy = 8,
Boolean force = false,
String id = 'title',
Mixed notes = false,
String nr,
Number rotation = 0,
Number scale = 1,
String title = 'plugin-annotations:noName',
classes = {
String date: 'text-sm fill-current',
String name: 'fill-note',
String notes: 'text-md fill-current',
String nr: 'text-4xl fill-note font-bold',
String title: 'text-lg fill-current font-bold',
}
})

Example

8 Monday, Nov 25, 2024 The Title Bazooka Crew Example v3 ( ephemeral ) You can use any brand you want but if you plan to contribute your design, you should use the default (btw: These are the notes)

An example of the title macro

Configuration

PropertyDefaultTypeDescription
alignleftStringHorizontal text alignment. One of left, right, or center
appendfalseBooleanSet this to true to append the nr, rather than overwrite it
atPointThe point at which to insert the title
brandFreeSewingStringBrand name will prefix the design name
classes.datetext-sm fill-currentStringCSS classes for the date
classes.namefill-noteStringCSS classes for the name
classes.notestext-md fill-currentStringCSS classes for the notes
classes.nrtext-4xl fill-note font-boldStringCSS classes for the nr
classes.titletext-lg fill-current font-boldStringCSS classes for the title
cutlisttrueBooleanSet this to true to prepend notes with the cutting instructions
dy8NumberSVG-equivalent of line height, controls the vertical spacing between text lines
forcefalsebooleanSet this to true to display the macro output even when complete is false
idtitlestringThe ID of this macro instance. See Removing macros and the role of the macro id
notesString or ArrayAny notes to go under the title
nrStringThe number of the pattern part
rotation0NumberRotation in degrees
scale1NumberAn optional scaling factor to make the title bigger/smaller
titleplugin-annotations:noNameStringThe name of the pattern part
prefixStringA prefix to add to the created points. This allow for more than 1 title per part, as long as you give them a different prefix.

Notes

  • This macro takes the complete setting into account and won't output anything when both complete and force are false.
  • This macro will check the value of store.version and store.name for the design version and name. These are auto-set by core.
  • This macro will check the value of store.for for info of who this pattern was generated for. This is something to be done at run-time by your frontend.
  • The notes property can be a string or an array of strings.