/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2014 *
+ * Copyright (c) 2001-2016 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
// Image typographique
// Fonctions pour l'arabe
-// http://doc.spip.org/@rtl_mb_ord
+// http://code.spip.net/@rtl_mb_ord
function rtl_mb_ord($char){
if (($c = ord($char)) < 216) return $c;
}
-// http://doc.spip.org/@rtl_reverse
+// http://code.spip.net/@rtl_reverse
function rtl_reverse($mot, $rtl_global) {
$rtl_prec = $rtl_global;
-// http://doc.spip.org/@rtl_visuel
+// http://code.spip.net/@rtl_visuel
function rtl_visuel($texte, $rtl_global) {
// hebreu + arabe: 54928 => 56767
// hebreu + presentation A: 15707294 => 15710140
}
-// http://doc.spip.org/@printWordWrapped
+// http://code.spip.net/@printWordWrapped
function printWordWrapped($image, $top, $left, $maxWidth, $font, $couleur, $text, $textSize, $align="left", $hauteur_ligne = 0) {
static $memps = array();
+ $fontps = false;
// imageftbbox exige un float, et settype aime le double pour php < 4.2.0
settype($textSize, 'double');
$line = '';
+ $lines = array();
while (count($words) > 0) {
$mot = $words[0];
// Deux passes pour recuperer, d'abord, largeur_ligne
// necessaire pour alignement right et center
+ $largeur_max = 0;
foreach ($lines as $line) {
if ($rtl_global) $line = rtl_visuel($line, $rtl_global);
//array imagefttext ( resource image, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo] )
//array imagettftext ( resource image, float size, float angle, int x, int y, int color, string fontfile, string text )
-// http://doc.spip.org/@produire_image_typo
+// http://code.spip.net/@produire_image_typo
function produire_image_typo() {
/*
arguments autorises: