Template Studio allows for text to be styled within an expression. This allows for more than one style to be applied to one item (separating parts of the text) and also allows finer control then is available from within the ribbon interface. This function is the textStyle function.
The format for this is as follows:
textStyle('My Text','Font Weight','Font Style','Font Colour')
e.g;textStyle('My Text','900','Italic','FF0000')
The parts of this function work as follows:
My Text - This is the text that is to be displayed on the log, this can be either plain text or can be any function that is compatible with Template Studio.
Font Weight - This is how heavy the text appears, on a scale 1 to 999, where 300 is Normal and 700 is Bold.
Font Style - This is the style of the text; Normal/Italic/Oblique.
Font Colour - This is the colour of the text in hexidecimal format (This includes transparency). Patterns supported are either RGB or ARGB formats such as FF0000 - red 00FF00 - green, 0000FF - blue and 880000FF is half transparent blue. An explanation of how this works can be found on Wikipedia here and a colour chart, useful for finding codes can be seen below.
Note - All arguments are required. For example, if you just want to bold text but not change the style or color, the expression would be:
textStyle('My Text','700','Normal','000000')
Examples can be seen below:
textStyle(ConcatenateWith('-',[SampleInformation.Type],[SampleInformation.SampleReference]),'900','Italic','FF0000')Would combine the sample type and reference in bold, italic, red text.
textStyle('Client: ','100','Oblique','0000FF')+textStyle([Project.ClientName],'900','Italic','FF0000')
Would show the text 'Client:' in blue oblique text and then the client name in bold, red, italic text.