Comment créer du texte à partir d'une police TTF et la convertir en un chemin SVG statique? De sorte que tout le monde puisse l'ouvrir dans Illustrator et voir le mot (en tant que .svg). P>
Notre serveur est debain et nous utilisons principalement PHP pour le codage de backend. P>
heureux d'utiliser ImageMagick ou Inkscape - tout ce qui est fait! P>
3 Réponses :
Essayez ceci:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="440.29297" height="39.824219" id="svg2"> <defs id="defs4" /> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <text x="-3.4374955" y="30.390625" id="maintext" xml:space="preserve" style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:[FONT_PLACEHOLDER]"><tspan x="-3.4374955" y="30.390625" id="tspan3006" style="fill:#000000">[TEXT_PLACEHOLDER]</tspan></text> </svg>
Trébuché sur ce message à partir de 2011. Après avoir vérifié la documentation d'Inkscape ( inkscape.org/doc/inkscape-man .html ) exporter-text-path to svg b> est mis en œuvre maintenant
Vous pouvez également indiquer Inkscape pour ouvrir votre fichier dans Mode GUI et ensuite émettre Commandes . L'entrée de ligne de commande suivante ouvre un SVG, sélectionne tous les nœuds et les convertit en chemins. Cela vous permettra de sauvegarder votre SVG converti Retour en SVG. inkscape -f your.svg --with-gui --verb EditSelectAll --verb ObjectToPath --verb FileSave --verb FileQuit
ou même plus simple, utilisez easysvg , cette bibliothèque convertit un texte en une définition SVG. Vous pouvez ensuite mettre cette définition dans un chemin ou autre. P>
La définition est basée sur le fichier SVG de la police, mais vous pouvez facilement convertir des fichiers TTF en SVG ... P>
Voir Stackoverflow.com/questions/8296964/...