Script to Convert Text to Curves

Annulé Publié le Sep 30, 2007 Paiement à la livraison
Annulé Paiement à la livraison

File Conversion utility needed for SVG or similar files

Command line utility needed to convert a single line of svg text

into vector outlines for the same, and giving a bounding box. Output to be in svg format with true vector paths - no references to fonts or glyphs.

we will consider pdf, eps and other formats which will yield vector paths for the text string. We are running php on a linux box.

example of the input is:

<text text-anchor:start; font-size: 1; font-family: Arial-Bold; font-weight: bold; fill: #000000; fill-opacity: 1; stroke: none;">Text Line 1</text>

example of output is:

<path fill="#1F1A17" fill-rule="nonzero" d="M0.829634 2.17099l0 -0.825925 -0.294906 0 0 -0.168287 0.790047 0 0 0.168287 -0.294217 0 0 0.825925 -0.200925 0zm0.937272 -0.229165l0.190047 0.0317126c-0.0245354,0.0696732 -0.0629606,0.122685 -0.11574,0.159028 -0.0525472,0.0365748 -0.11852,0.0546299 -0.197685,0.0546299 -0.125232,0 -0.217823,-0.0407402 -0.278008,-0.122685 -0.0474567,-0.0655118 -0.0712992,-0.148382 -0.0712992,-0.24815 0,-0.119445 0.031252,-0.212965 0.093752,-0.280555 0.0622677,-0.0675945 0.141205,-0.10139 0.236575,-0.10139 0.107173,0 0.191665,0.0354173 0.253701,0.106252 0.0618071,0.0708307 0.091437,0.179165 0.0888898,0.325228l-0.477547 0c0.00138976,0.0564843 0.0166693,0.100465 0.0460669,0.131717 0.0293976,0.0314803 0.0662047,0.0472205 0.109953,0.0472205 0.0298622,0 0.0548622,-0.00810236 0.0752323,-0.0243071 0.0203701,-0.0164331 0.035878,-0.0425906 0.046063,-0.0787008zm0.0108819 -0.192594c-0.00138976,-0.0553228 -0.0155118,-0.0972205 -0.0425945,-0.125925 -0.0270827,-0.0287047 -0.060185,-0.0430551 -0.0990748,-0.0430551 -0.0416654,0 -0.0759252,0.0152756 -0.103008,0.0456024 -0.0270827,0.0300906 -0.0405079,0.0712953 -0.0400472,0.123378l0.284724 0zm0.253008 0.42176l0.25972 -0.371067 -0.248843 -0.349071 0.232642 0 0.127543 0.197913 0.13426 -0.197913 0.223843 0 -0.244213 0.340972 0.266437 0.379165 -0.233799 0 -0.146528 -0.22315 -0.147913 0.22315 -0.22315 0zm1.19421 -0.720138l0 0.15185 -0.130094 0 0 0.29028c0,0.0587953 0.00115748,0.0930551 0.00370472,0.102776 0.00254724,0.00972441 0.00810236,0.0175945 0.0168976,0.0240748 0.00879528,0.00624803 0.0196772,0.00949213 0.0321772,0.00949213 0.0178228,0 0.0432874,-0.00625197 0.0768504,-0.0182874l0.0162047 0.147685c-0.0444449,0.0189803 -0.0944449,0.0284724 -0.150693,0.0284724 -0.0342598,0 -0.0652795,-0.0057874 -0.0928268,-0.0171299 -0.0275472,-0.0115748 -0.047685,-0.026622 -0.0606457,-0.0449094 -0.0129646,-0.0182874 -0.0217598,-0.0430551 -0.0268543,-0.0743031 -0.00393307,-0.0219921 -0.00601969,-0.0668976 -0.00601969,-0.13426l0 -0.31389 -0.0875 0 0 -0.15185 0.0875 0 0 -0.143287 0.191205 -0.111114 0 0.254402 0.130094 0zm0.524996 0.720138l0 -0.98611 0.200697 0 0 0.818516 0.499075 0 0 0.167594 -0.699772 0zm0.841669 -0.817823l0 -0.17639 0.190512 0 0 0.17639 -0.190512 0zm0 0.817823l0 -0.720138 0.190512 0 0 0.720138 -0.190512 0zm1.04097 0l-0.190512 0 0 -0.367594c0,-0.0777756 -0.00416535,-0.128008 -0.0122677,-0.150925 -0.00810236,-0.022685 -0.0215276,-0.0405079 -0.039815,-0.0532402 -0.0182874,-0.0125 -0.0402756,-0.0189803 -0.0659724,-0.0189803 -0.0331024,0 -0.0627283,0.00902756 -0.0888858,0.0270827 -0.0261575,0.0182874 -0.0442165,0.0421299 -0.053937,0.0719921 -0.00972047,0.0298583 -0.0145827,0.0849528 -0.0145827,0.165508l0 0.326157 -0.190512 0 0 -0.720138 0.176854 0 0 0.105787c0.0629606,-0.0814843 0.14213,-0.122224 0.2375,-0.122224 0.0418976,0 0.0805551,0.0076378 0.115276,0.022685 0.0347244,0.0152795 0.0611142,0.0344921 0.078937,0.0581024 0.0178228,0.0236102 0.0303228,0.0502323 0.0372677,0.0800945 0.00717717,0.0298583 0.0106496,0.0724528 0.0106496,0.128008l0 0.447685zm0.610185 -0.229165l0.190047 0.0317126c-0.0245354,0.0696732 -0.0629606,0.122685 -0.11574,0.159028 -0.0525472,0.0365748 -0.11852,0.0546299 -0.197685,0.0546299 -0.125232,0 -0.217823,-0.0407402 -0.278008,-0.122685 -0.0474567,-0.0655118 -0.0712992,-0.148382 -0.0712992,-0.24815 0,-0.119445 0.031252,-0.212965 0.093752,-0.280555 0.0622677,-0.0675945 0.141205,-0.10139 0.236575,-0.10139 0.107173,0 0.191665,0.0354173 0.253701,0.106252 0.0618071,0.0708307 0.091437,0.179165 0.0888898,0.325228l-0.477547 0c0.00138976,0.0564843 0.0166693,0.100465 0.0460669,0.131717 0.0293976,0.0314803 0.0662047,0.0472205 0.109953,0.0472205 0.0298622,0 0.0548622,-0.00810236 0.0752323,-0.0243071 0.0203701,-0.0164331 0.035878,-0.0425906 0.046063,-0.0787008zm0.0108819 -0.192594c-0.00138976,-0.0553228 -0.0155118,-0.0972205 -0.0425945,-0.125925 -0.0270827,-0.0287047 -0.060185,-0.0430551 -0.0990748,-0.0430551 -0.0416654,0 -0.0759252,0.0152756 -0.103008,0.0456024 -0.0270827,0.0300906 -0.0405079,0.0712953 -0.0400472,0.123378l0.284724 0zm1.17731 0.42176l-0.190508 0 0 -0.718287c-0.0696772,0.0652795 -0.151622,0.113425 -0.246067,0.144445l0 -0.172917c0.0495394,-0.0162047 0.103705,-0.0469921 0.162039,-0.0923622 0.0583307,-0.0456024 0.098378,-0.0986102 0.119906,-0.15926l0.15463 0 0 0.998382z"/>

Programmation C JavaScript Linux PHP

Nº du projet : #181832

À propos du projet

4 propositions Projet à distance Actif Oct 16, 2007