To do this, you need to use the image_typo filter that is documented on this page.
![]()
If you do not provide any parameters, image_typo will use the default font provided by SPIP: Dustismo, which is a GPL font by Dustin Norlander.
Fonts
You can specify the name of the font to use by using the police parameter (the font needs, of course, to be installed on your site):
![]()
(Dustismo-bold is also provided by default by SPIP.)
You can, in theory, use many font formats: TrueType, PostScript Type 1, OpenType... However, depending on your server configuration, some formats may not be accepted.
The fonts have to be installed in a sub-directory: /polices underneath the /ecrire directory, or — even better — underneath your template directory.
If, for example, you install a TrueType file:
/squelettes/polices/stencil.ttf
it will be possible to use this new font [2].
Size
You can specify the size of the font by using the parameter taille.

Note: do not use “36pt”, but only “36” — without specifying the units.
Colour
The parameter couleur can be used to specify the colour of the font. By default, the colour will be black. This parameter takes an hexadecimal RGB value with the notation: «3399BB». Note: do not use the # usually added to the colour notations in HTML and CSS.
Width
The parameter largeur gives you a control over the maximum width of the generated image. Note: this is a maximum value, the image will be automatically reframed afterwards to fit the real dimensions of the text.
The first block in the following example is made with a maximum width of 300 pixels, the second block with a width of 400 pixels.

Alignment
The align parameter sets the alignment of multiple lines of text (if applicable) to the left, right or center.

Line height
The parameter
hauteur_ligne fixes the height of each line (if the images contains multiple line of texts).
Padding
Some fonts will “get out” of the assigned box and the result looks really bad (the font will be “cut”). The padding parameter makes it possible, in such cases, to force extra space around the typographical image.
Filtering the image
The result of image_typo is an image and therefore can be processed by the image filters (not yet published). For example, the following code applies a semi-transparency and a texture mask.


SPIP 1.9.2