From b743448db3715856812c6f33ee0613c5328528cb Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Fri, 8 Jan 2021 02:09:50 +0100 Subject: [PATCH] More SVG --- chant.php | 4 ++-- chant_img.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chant.php b/chant.php index 361231e..66a76ff 100644 --- a/chant.php +++ b/chant.php @@ -229,13 +229,13 @@ if(is_string($content)) { } echo "\n"; } -foreach(array('pdf','eps','png') as $a) { +foreach(array('pdf','svg','eps','png') as $a) { echo '
  • '.strtoupper($a).'
  • '."\n"; } echo "\n"; if($c['gabc_verses'] || $c['tex_verses']){ echo "\n"; diff --git a/chant_img.php b/chant_img.php index 3564c5e..d64352b 100644 --- a/chant_img.php +++ b/chant_img.php @@ -137,7 +137,7 @@ function mgabc2tex($c, $firstverse = False) { $tex .= '\greannotation{\small \textbf{'.$mode.".}}\n"; } if($c['commentary']) { - $tex .= '\commentary{{\small \emph{'.$c['commentary']."}}}\n"; + $tex .= '\grecommentary{{\small \emph{'.$c['commentary']."}}}\n"; $tex .= '\nolinebreak[4]'."\n"; } # @@ -196,7 +196,7 @@ function makeimgfiles($id, $tex, $suffix = '') { unlink(substr($f[1],0,-4).'.pdf'); } -$uri = __DIR__.'/scores/'.$id.'.png'; +$uri = __DIR__.'/scores/svg/'.$id.'.svg'; if(!is_file($uri) || (array_key_exists("force", $_GET) && $_GET["force"] == "1")) { $sql1 = 'SELECT * FROM '.db('chants').' WHERE id = '.$id; $req1 = $mysqli->query($sql1) or die('Erreur SQL !
    '.$sql1.'
    '.$mysqli->error); @@ -206,7 +206,7 @@ if(!is_file($uri) || (array_key_exists("force", $_GET) && $_GET["force"] == "1") } makeimg($c); } -header('Content-Disposition: inline; filename='.$id.'.png'); -header("Content-type: image/png"); +header('Content-Disposition: inline; filename='.$id.'.svg'); +header("Content-type: image/svg+xml"); readfile($uri); ?>