Et kamagra prix on n est pas assez entourées. Je achat viagra ordonnance suis profondément triste, au bord des larmes. Les acheter cialis paris avocats comme leurs clients étaient atterrés. Il priligy pas cher en belgique ne la résout pas, il l accueille. La relation viagra generique livraison rapide humaine. Hill, appelant ou acheter viagra les acheteurs à revenir vers Spanghero. Aucune d cialis pour homme entre elles n accepte la maltraitance. On en achat viagra naturel comptait moins de dix par an jusque-là. Le médecin acheter dapoxetine n a pas donné suite aux appels du Monde. C est finastéride pas cher ce que nous faisons. Depuis comparateur prix cialis 2010, il s est pourtant rajeuni et féminisé. A faut il une ordonnance pour acheter du viagra en pharmacie côté d eux, l Etat semble bien dépassé. Il comparatif vente viagra n était pas présent ce mercredi. En fait, commander kamagra et M. Jusqu à vardénafil prix épuisement total du stock et de mon corps. Elle acheter levitra non generique est considérée comme obèse au-delà de 30. Et pour achat vrai viagra ligne les mineurs, interdire toute consommation. Typographical Images - SPIP
SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [vi] [zh] Espace de traduction

Download

Typographical Images

Graphical titles with the font of your choice

September 2006 — updated on : August 2010

All the versions of this article:


[ SPIP 1.9, GD2 and Freetype]

If GD2 and Freetype are installed on your server [1], SPIP can automatically convert titles (or other text elements from the database) into images, using the font of your choice.

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. It is stored in the polices sub-directory of the dist or squelettes-dist folder for SPIP 2 (in previous version of SPIP , this was called the ecrire folder).

Fonts

You can specify the name of another 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:
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 taille parameter.

Note: do not use “36pt”, but only “36” — without specifying the units.

Colour

The couleur parameter 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 largeur parameter 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 “overflow” 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. For example, the following code applies a semi-transparency and a texture mask.

P.S.

N.B.1. The image created by image_typo will be in PNG 24 format with an alpha layer to support the transparency. To force Microsoft Internet Explorer to display this transparency correctly, SPIP uses a specific CSS class: format_png, defined in spip_style.css; this one declares a MSIE behaviour. You should therefore include this style sheet in your templates.

N.B.2. some fonts (in particular italics and English fonts) are problematic. The features of GD2 used by SPIP seem to be still under development and we hope GD2 will progress rapidly.

N.B.3. Arabic, Farsi, or Hebrew? Since SPIP 2.0, these are now all available in all their glory!

Footnotes

[1GD2 is a graphical extension for PHP that provides many image manipulation features. Freetype, often installed with GD2, is an extension that can insert formatted texts into an image using TrueType and Postscripts fonts. If in doubt, contact your service provider to find out if these packages are installed.

[2Warning: unless you protect the folder (with an htaccess for example), anyone will be able to download your font files. If you use commercial fonts, beware of inadvertently distributing them without authorisation.


Show the template of this page Site powered by SPIP | Translation area | Private area