tags:

views:

24

answers:

0

Ok After lots of Time this question is asked (even i asked too :P) i find out a simplest way to do it and here i will answer it hope that will help for my Friends this not only will help specifcally to Arabic/Urdu Alphabets but anyone can Genrate any language word with this Answer (Just by Replacing the Paths and Decimal NCRs of the Alphabet) ok we need 2 files

Start/Index File (basic HTML and Some Form Validation)

<html>
<head>
<title>Ruka</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1?">
    <style type="text/css">
        .Error{
            border: solid 4px #F00;
            };
    </style>
</head>

    <script language="javascript" type="text/javascript">
    function validation()
    {
        var alphaExp = /^[0-9a-zA-Z]+$/;
        var txtfield = document.getElementById("txtUrdu");
        if(txtfield.value == "")
        {
            alert('Field Should not be empty');
            txtfield.className = "Error";
            return false;
        }
        else
        {
            if(txtfield.value.match(alphaExp))
            {
            alert('Field Should not English Character Neither Should be Numaric');
            txtfield.className = "Error";
            return false;
            }
            submit();
            txtfield.className = "Correct";
            return true;
        }
    }
    </script>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" border="0">

<table id="Table_01" width="640" height="481" border="0" cellpadding="0" cellspacing="0" align="center">
    <tr>
        <td colspan="4" align="center" >
            <form action="process.php" method="post" onSubmit="return validation();" >
                Enter Alphabet (Urdu): <input name="inpUrdu" type="text" id="txtUrdu" value="" maxlength="1" class="Correct" style="text-align:right"/><br><br>
                <input  type="submit" name="submit" value="Process" /> 

          </form>
        </td>

    </tr>

</table>
</body>


</html>

2nd File is Processing File (don't be afraid of its length these are just paths of the alphabets 30+) atthe end of the this file there are some echo statments genrating the svg according to the alphabet that was POSTED by form and then checking them in the simple function containing if else to identify the alphabet and render path according to it

<?php header("Content-type: image/svg+xml");?>
<?php
function processalphabet()
{
        $alphabetU = $_POST['inpUrdu'];

            if($alphabetU == "&#1575;")
            {
                    echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-691.81705,845.07773)"
       id="g6223">
      <g
         id="g6225">
        <g
           id="g6227">
          <path
             inkscape:connector-curvature="0"
             d="m 953.012,62.624 c 0,0.326 -0.051,0.926 -0.152,1.801 -0.101,0.875 -0.244,1.861 -0.427,2.96 -0.184,1.099 -0.388,2.249 -0.61,3.448 -0.225,1.201 -0.458,2.289 -0.702,3.266 -0.244,0.977 -0.479,1.791 -0.702,2.441 -0.223,0.65 -0.438,0.977 -0.641,0.977 -0.692,0 -1.037,-0.326 -1.037,-0.977 0,-0.203 0.131,-0.885 0.396,-2.045 0.264,-1.159 0.396,-2.655 0.396,-4.486 0,-1.139 -0.122,-2.869 -0.366,-5.188 -0.244,-2.319 -0.55,-4.923 -0.915,-7.812 -0.367,-2.889 -0.754,-5.879 -1.16,-8.972 -0.407,-3.092 -0.793,-5.981 -1.16,-8.667 -0.365,-2.686 -0.671,-5.005 -0.915,-6.958 -0.244,-1.953 -0.366,-3.214 -0.366,-3.784 0,-0.936 0.143,-2.065 0.428,-3.387 0.284,-1.322 0.619,-2.594 1.007,-3.815 0.386,-1.221 0.783,-2.278 1.19,-3.174 0.406,-0.895 0.732,-1.383 0.977,-1.465 0.081,0.122 0.162,0.387 0.244,0.793 0.081,0.407 0.152,0.854 0.213,1.343 0.062,0.488 0.112,0.987 0.152,1.495 0.041,0.509 0.062,0.926 0.062,1.251 l 0,3.479 4.088,37.476 z"
             id="path6229" />
        </g>
      </g>
    </g>
  </g>
';
            }


            if($alphabetU == "&#1576;")
            {
                echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-557.04857,797.7651)"
       id="g6251">
      <g
         id="g6253">
        <g
           id="g6255">
          <path
             inkscape:connector-curvature="0"
             d="m 900.783,85.3 c 0,1.018 -0.116,2.146 -0.35,3.388 -0.232,1.241 -0.673,2.502 -1.319,3.784 -0.648,1.281 -1.592,2.523 -2.834,3.723 -1.242,1.201 -2.873,2.289 -4.892,3.266 -2.95,1.303 -6.38,2.502 -10.287,3.601 -3.909,1.099 -8.049,2.035 -12.423,2.808 -4.374,0.773 -8.864,1.374 -13.47,1.8 -4.607,0.428 -9.084,0.641 -13.432,0.641 -5.177,0 -9.771,-0.305 -13.781,-0.916 -4.012,-0.61 -7.39,-1.505 -10.132,-2.686 -2.744,-1.18 -4.827,-2.655 -6.25,-4.425 -1.425,-1.771 -2.136,-3.815 -2.136,-6.134 0,-1.261 0.35,-2.665 1.049,-4.211 0.698,-1.546 1.5,-2.991 2.406,-4.333 0.905,-1.343 1.772,-2.461 2.602,-3.357 0.827,-0.895 1.345,-1.343 1.553,-1.343 0.258,0 0.504,0.082 0.737,0.244 0.232,0.163 0.271,0.346 0.116,0.549 -0.207,0.285 -0.505,0.671 -0.893,1.16 -0.389,0.488 -0.765,1.059 -1.126,1.709 -0.362,0.651 -0.673,1.364 -0.932,2.136 -0.26,0.773 -0.389,1.608 -0.389,2.502 0,1.384 0.428,2.625 1.281,3.723 0.854,1.099 1.992,2.055 3.416,2.869 1.424,0.814 3.079,1.495 4.97,2.045 1.889,0.549 3.882,0.997 5.978,1.343 2.097,0.346 4.244,0.601 6.444,0.763 2.199,0.163 4.31,0.244 6.328,0.244 3.829,0 7.814,-0.173 11.956,-0.519 4.141,-0.346 8.217,-0.824 12.229,-1.435 4.011,-0.61 7.814,-1.302 11.413,-2.075 3.597,-0.772 6.767,-1.577 9.511,-2.411 2.743,-0.833 4.917,-1.688 6.521,-2.563 1.604,-0.875 2.407,-1.678 2.407,-2.411 0,-0.406 -0.233,-0.925 -0.699,-1.556 -0.466,-0.631 -0.997,-1.312 -1.592,-2.045 -0.595,-0.733 -1.125,-1.465 -1.591,-2.197 -0.466,-0.732 -0.699,-1.383 -0.699,-1.953 0,-0.406 0.142,-0.956 0.427,-1.648 0.284,-0.691 0.595,-1.404 0.932,-2.136 0.337,-0.732 0.686,-1.424 1.049,-2.075 0.361,-0.65 0.621,-1.139 0.776,-1.465 0.776,0.732 1.487,1.587 2.135,2.563 0.646,0.977 1.19,2.004 1.631,3.082 0.438,1.079 0.776,2.137 1.009,3.174 0.235,1.038 0.351,1.963 0.351,2.777 z m -40.839,33.691 c 0,0.162 -0.232,0.559 -0.698,1.19 -0.466,0.63 -0.997,1.302 -1.592,2.014 -0.596,0.712 -1.178,1.353 -1.747,1.923 -0.57,0.569 -0.983,0.854 -1.242,0.854 -0.104,0 -0.531,-0.183 -1.281,-0.549 -0.751,-0.366 -1.553,-0.784 -2.406,-1.251 -0.854,-0.468 -1.618,-0.926 -2.291,-1.373 -0.673,-0.448 -1.009,-0.753 -1.009,-0.916 0,-0.163 0.245,-0.56 0.737,-1.19 0.491,-0.631 1.035,-1.303 1.631,-2.015 0.594,-0.712 1.177,-1.353 1.746,-1.922 0.569,-0.57 0.933,-0.854 1.088,-0.854 0.206,0 0.698,0.193 1.475,0.58 0.777,0.387 1.578,0.824 2.407,1.312 0.827,0.488 1.564,0.956 2.213,1.404 0.646,0.447 0.969,0.711 0.969,0.793 z"
             id="path6257" />
        </g>
      </g>
    </g>
  </g>
';
            }

            if($alphabetU == "&#1662;")
            {
                echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-455.61877,785.77717)"
       id="g6291">
      <g
         id="g6293">
        <g
           id="g6295">
          <path
             inkscape:connector-curvature="0"
             d="m 779.521,85.3 c 0,1.018 -0.092,2.146 -0.275,3.388 -0.183,1.242 -0.529,2.502 -1.037,3.784 -0.51,1.281 -1.252,2.523 -2.229,3.723 -0.977,1.201 -2.258,2.289 -3.845,3.266 -2.319,1.303 -5.015,2.502 -8.087,3.601 -3.072,1.099 -6.328,2.035 -9.766,2.808 -3.439,0.772 -6.969,1.374 -10.59,1.8 -3.622,0.428 -7.141,0.641 -10.559,0.641 -4.07,0 -7.682,-0.305 -10.834,-0.916 -3.154,-0.61 -5.809,-1.505 -7.965,-2.686 -2.158,-1.18 -3.795,-2.655 -4.914,-4.425 -1.119,-1.771 -1.678,-3.815 -1.678,-6.134 0,-1.261 0.273,-2.665 0.824,-4.211 0.549,-1.546 1.18,-2.991 1.891,-4.333 0.713,-1.343 1.395,-2.461 2.045,-3.357 0.65,-0.895 1.059,-1.343 1.221,-1.343 0.203,0 0.396,0.082 0.58,0.244 0.184,0.163 0.214,0.346 0.092,0.549 -0.163,0.285 -0.396,0.671 -0.701,1.16 -0.307,0.488 -0.602,1.059 -0.886,1.709 -0.285,0.651 -0.529,1.364 -0.732,2.136 -0.204,0.773 -0.306,1.608 -0.306,2.502 0,1.384 0.336,2.625 1.008,3.723 0.672,1.098 1.566,2.055 2.686,2.869 1.119,0.814 2.42,1.495 3.906,2.045 1.484,0.549 3.051,0.997 4.699,1.343 1.648,0.346 3.336,0.601 5.066,0.763 1.729,0.163 3.387,0.244 4.975,0.244 3.01,0 6.143,-0.173 9.398,-0.519 3.255,-0.346 6.46,-0.824 9.613,-1.435 3.153,-0.611 6.145,-1.302 8.973,-2.075 2.828,-0.772 5.319,-1.577 7.477,-2.411 2.156,-0.833 3.865,-1.688 5.127,-2.563 1.261,-0.875 1.893,-1.678 1.893,-2.411 0,-0.406 -0.184,-0.925 -0.55,-1.556 -0.366,-0.631 -0.784,-1.312 -1.251,-2.045 -0.469,-0.732 -0.885,-1.465 -1.252,-2.197 -0.365,-0.732 -0.549,-1.383 -0.549,-1.953 0,-0.406 0.111,-0.956 0.336,-1.648 0.223,-0.691 0.467,-1.404 0.732,-2.136 0.264,-0.732 0.539,-1.424 0.824,-2.075 0.283,-0.65 0.488,-1.139 0.609,-1.465 0.611,0.732 1.17,1.587 1.68,2.563 0.508,0.977 0.936,2.004 1.281,3.082 0.346,1.079 0.609,2.137 0.793,3.174 0.186,1.038 0.277,1.964 0.277,2.777 z m -27.222,33.753 c 0,0.162 -0.183,0.559 -0.549,1.19 -0.366,0.631 -0.783,1.302 -1.252,2.015 -0.467,0.711 -0.914,1.352 -1.342,1.922 -0.428,0.569 -0.723,0.854 -0.885,0.854 -0.082,0 -0.396,-0.193 -0.947,-0.58 -0.549,-0.387 -1.149,-0.824 -1.8,-1.312 -0.732,-0.57 -1.567,-1.201 -2.503,-1.892 -0.244,-0.204 -0.417,-0.285 -0.518,-0.244 -0.103,0.04 -0.215,0.162 -0.336,0.366 -0.652,0.854 -1.221,1.648 -1.709,2.38 -0.449,0.61 -0.876,1.16 -1.282,1.648 -0.407,0.488 -0.671,0.732 -0.794,0.732 -0.082,0 -0.417,-0.193 -1.006,-0.58 -0.591,-0.387 -1.221,-0.834 -1.893,-1.343 -0.672,-0.509 -1.272,-0.987 -1.801,-1.435 -0.529,-0.448 -0.793,-0.732 -0.793,-0.854 0,-0.122 0.192,-0.509 0.58,-1.16 0.386,-0.651 0.823,-1.323 1.312,-2.014 0.488,-0.692 0.946,-1.323 1.374,-1.892 0.426,-0.57 0.68,-0.854 0.762,-0.854 0.203,0 0.57,0.193 1.1,0.58 0.527,0.387 1.098,0.803 1.709,1.251 0.732,0.528 1.504,1.139 2.318,1.831 0.244,0.203 0.406,0.315 0.488,0.335 0.082,0.02 0.244,-0.132 0.488,-0.458 l 1.709,-2.319 c 0.447,-0.57 0.875,-1.099 1.282,-1.587 0.406,-0.488 0.671,-0.732 0.794,-0.732 0.162,0 0.539,0.193 1.129,0.58 0.59,0.387 1.21,0.824 1.861,1.312 0.65,0.488 1.23,0.956 1.74,1.404 0.51,0.449 0.764,0.734 0.764,0.856 z m -4.272,12.085 c 0,0.122 -0.184,0.498 -0.55,1.129 -0.366,0.63 -0.773,1.291 -1.221,1.983 -0.448,0.691 -0.896,1.322 -1.343,1.892 -0.448,0.569 -0.773,0.854 -0.977,0.854 -0.122,0 -0.479,-0.183 -1.068,-0.549 -0.589,-0.366 -1.221,-0.784 -1.893,-1.251 -0.67,-0.468 -1.271,-0.926 -1.8,-1.374 -0.529,-0.448 -0.794,-0.753 -0.794,-0.916 0,-0.163 0.193,-0.56 0.58,-1.19 0.387,-0.63 0.824,-1.302 1.312,-2.014 0.488,-0.712 0.955,-1.354 1.404,-1.923 0.447,-0.57 0.732,-0.854 0.854,-0.854 0.162,0 0.539,0.193 1.129,0.58 0.59,0.386 1.211,0.833 1.862,1.343 0.65,0.508 1.23,0.986 1.739,1.434 0.511,0.448 0.766,0.734 0.766,0.856 z"
             id="path6297" />
        </g>
      </g>
    </g>
  </g>';    
            }

            if($alphabetU == "&#1578;")
            {
                echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-351.53995,814.37611)"
       id="g6299">
      <g
         id="g6301">
        <g
           id="g6303">
          <path
             inkscape:connector-curvature="0"
             d="m 675.129,85.3 c 0,1.018 -0.092,2.146 -0.275,3.388 -0.183,1.242 -0.529,2.502 -1.037,3.784 -0.51,1.281 -1.252,2.523 -2.229,3.723 -0.977,1.201 -2.258,2.289 -3.845,3.266 -2.319,1.303 -5.015,2.502 -8.087,3.601 -3.072,1.099 -6.328,2.035 -9.766,2.808 -3.439,0.772 -6.969,1.374 -10.59,1.8 -3.622,0.428 -7.141,0.641 -10.559,0.641 -4.07,0 -7.682,-0.305 -10.834,-0.916 -3.154,-0.61 -5.809,-1.505 -7.965,-2.686 -2.158,-1.18 -3.795,-2.655 -4.914,-4.425 -1.119,-1.771 -1.678,-3.815 -1.678,-6.134 0,-1.261 0.273,-2.665 0.824,-4.211 0.549,-1.546 1.18,-2.991 1.891,-4.333 0.713,-1.343 1.395,-2.461 2.045,-3.357 0.65,-0.895 1.059,-1.343 1.221,-1.343 0.203,0 0.396,0.082 0.58,0.244 0.184,0.163 0.214,0.346 0.092,0.549 -0.163,0.285 -0.396,0.671 -0.701,1.16 -0.307,0.488 -0.602,1.059 -0.886,1.709 -0.285,0.651 -0.529,1.364 -0.732,2.136 -0.204,0.773 -0.306,1.608 -0.306,2.502 0,1.384 0.336,2.625 1.008,3.723 0.672,1.098 1.566,2.055 2.686,2.869 1.119,0.814 2.42,1.495 3.906,2.045 1.484,0.549 3.051,0.997 4.699,1.343 1.648,0.346 3.336,0.601 5.066,0.763 1.729,0.163 3.387,0.244 4.975,0.244 3.01,0 6.143,-0.173 9.398,-0.519 3.255,-0.346 6.46,-0.824 9.613,-1.435 3.153,-0.611 6.145,-1.302 8.973,-2.075 2.828,-0.772 5.319,-1.577 7.477,-2.411 2.156,-0.833 3.865,-1.688 5.127,-2.563 1.261,-0.875 1.893,-1.678 1.893,-2.411 0,-0.406 -0.184,-0.925 -0.55,-1.556 -0.366,-0.631 -0.784,-1.312 -1.251,-2.045 -0.469,-0.732 -0.885,-1.465 -1.252,-2.197 -0.365,-0.732 -0.549,-1.383 -0.549,-1.953 0,-0.406 0.111,-0.956 0.336,-1.648 0.223,-0.691 0.467,-1.404 0.732,-2.136 0.264,-0.732 0.539,-1.424 0.824,-2.075 0.283,-0.65 0.488,-1.139 0.609,-1.465 0.611,0.732 1.17,1.587 1.68,2.563 0.508,0.977 0.936,2.004 1.281,3.082 0.346,1.079 0.609,2.137 0.793,3.174 0.185,1.038 0.277,1.964 0.277,2.777 z M 648.15,70.835 c 0,0.163 -0.183,0.57 -0.549,1.221 -0.366,0.651 -0.783,1.333 -1.252,2.044 -0.467,0.712 -0.914,1.354 -1.342,1.923 -0.428,0.57 -0.723,0.854 -0.885,0.854 -0.082,0 -0.396,-0.193 -0.947,-0.58 -0.549,-0.386 -1.149,-0.824 -1.8,-1.312 -0.732,-0.569 -1.567,-1.2 -2.503,-1.892 -0.285,-0.284 -0.57,-0.284 -0.854,0 -0.611,0.854 -1.16,1.648 -1.648,2.38 -0.448,0.61 -0.865,1.16 -1.252,1.648 -0.387,0.488 -0.641,0.732 -0.762,0.732 -0.123,0 -0.479,-0.193 -1.068,-0.58 -0.59,-0.386 -1.211,-0.824 -1.861,-1.312 -0.652,-0.488 -1.242,-0.956 -1.771,-1.404 -0.529,-0.447 -0.794,-0.732 -0.794,-0.854 0,-0.162 0.193,-0.559 0.58,-1.19 0.387,-0.63 0.824,-1.302 1.312,-2.014 0.488,-0.712 0.945,-1.353 1.373,-1.923 0.428,-0.569 0.682,-0.854 0.764,-0.854 0.203,0 0.568,0.193 1.098,0.58 0.53,0.387 1.078,0.804 1.648,1.251 0.691,0.529 1.443,1.16 2.258,1.892 0.244,0.204 0.418,0.315 0.52,0.335 0.102,0.021 0.254,-0.131 0.457,-0.458 0.611,-0.895 1.18,-1.688 1.709,-2.38 0.447,-0.569 0.875,-1.099 1.282,-1.587 0.406,-0.488 0.65,-0.732 0.732,-0.732 0.122,0 0.488,0.204 1.099,0.61 0.61,0.407 1.24,0.865 1.893,1.373 0.65,0.509 1.24,0.987 1.77,1.435 0.529,0.449 0.793,0.713 0.793,0.794 z"
             id="path6305" />
        </g>
      </g>
    </g>
  </g>';
            }

            if($alphabetU == "&#1657;")
            {
                echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-252.47903,814.37611)"
       id="g6307">
      <g
         id="g6309">
        <g
           id="g6311">
          <path
             inkscape:connector-curvature="0"
             d="m 575.77,85.3 c 0,1.018 -0.092,2.146 -0.275,3.388 -0.183,1.242 -0.529,2.502 -1.037,3.784 -0.51,1.281 -1.252,2.523 -2.229,3.723 -0.977,1.201 -2.258,2.289 -3.845,3.266 -2.319,1.303 -5.015,2.502 -8.087,3.601 -3.072,1.099 -6.328,2.035 -9.766,2.808 -3.439,0.772 -6.969,1.374 -10.59,1.8 -3.622,0.428 -7.141,0.641 -10.559,0.641 -4.07,0 -7.682,-0.305 -10.834,-0.916 -3.154,-0.61 -5.809,-1.505 -7.965,-2.686 -2.158,-1.18 -3.795,-2.655 -4.914,-4.425 -1.119,-1.771 -1.678,-3.815 -1.678,-6.134 0,-1.261 0.273,-2.665 0.824,-4.211 0.549,-1.546 1.18,-2.991 1.891,-4.333 0.713,-1.343 1.395,-2.461 2.045,-3.357 0.65,-0.895 1.059,-1.343 1.221,-1.343 0.203,0 0.396,0.082 0.58,0.244 0.184,0.163 0.214,0.346 0.092,0.549 -0.163,0.285 -0.396,0.671 -0.701,1.16 -0.307,0.488 -0.602,1.059 -0.886,1.709 -0.285,0.651 -0.529,1.364 -0.732,2.136 -0.204,0.773 -0.306,1.608 -0.306,2.502 0,1.384 0.336,2.625 1.008,3.723 0.672,1.098 1.566,2.055 2.686,2.869 1.119,0.814 2.42,1.495 3.906,2.045 1.484,0.549 3.051,0.997 4.699,1.343 1.648,0.346 3.336,0.601 5.066,0.763 1.729,0.163 3.387,0.244 4.975,0.244 3.01,0 6.143,-0.173 9.398,-0.519 3.255,-0.346 6.46,-0.824 9.613,-1.435 3.153,-0.611 6.145,-1.302 8.973,-2.075 2.828,-0.772 5.319,-1.577 7.477,-2.411 2.156,-0.833 3.865,-1.688 5.127,-2.563 1.261,-0.875 1.893,-1.678 1.893,-2.411 0,-0.406 -0.184,-0.925 -0.55,-1.556 -0.366,-0.631 -0.784,-1.312 -1.251,-2.045 -0.469,-0.732 -0.885,-1.465 -1.252,-2.197 -0.365,-0.732 -0.549,-1.383 -0.549,-1.953 0,-0.406 0.111,-0.956 0.336,-1.648 0.223,-0.691 0.467,-1.404 0.732,-2.136 0.264,-0.732 0.539,-1.424 0.824,-2.075 0.283,-0.65 0.488,-1.139 0.609,-1.465 0.611,0.732 1.17,1.587 1.68,2.563 0.508,0.977 0.936,2.004 1.281,3.082 0.346,1.079 0.609,2.137 0.793,3.174 0.185,1.038 0.277,1.964 0.277,2.777 z M 552.453,67.478 c 0,1.303 -0.365,2.462 -1.098,3.479 -0.732,1.018 -1.699,1.902 -2.9,2.655 -1.199,0.753 -2.562,1.404 -4.088,1.953 -1.527,0.55 -3.094,0.987 -4.701,1.312 -1.607,0.326 -3.174,0.57 -4.699,0.732 -1.525,0.163 -2.898,0.244 -4.119,0.244 -0.449,0 -0.957,-0.122 -1.526,-0.366 -0.57,-0.244 -1.12,-0.549 -1.647,-0.916 -0.529,-0.366 -0.967,-0.742 -1.312,-1.129 -0.346,-0.386 -0.52,-0.742 -0.52,-1.068 0,-0.203 0.082,-0.305 0.244,-0.305 0.529,0 0.936,0.021 1.221,0.061 0.285,0.041 0.529,0.071 0.732,0.091 0.203,0.021 0.447,0.052 0.732,0.092 0.285,0.041 0.691,0.061 1.221,0.061 1.059,0 1.861,-0.132 2.412,-0.397 0.549,-0.264 1.189,-0.763 1.922,-1.495 0.325,-0.65 0.559,-1.414 0.701,-2.289 0.143,-0.875 0.215,-1.535 0.215,-1.983 0,-1.099 -0.021,-2.054 -0.062,-2.869 -0.041,-0.813 -0.091,-1.587 -0.153,-2.319 -0.061,-0.732 -0.152,-1.455 -0.273,-2.167 -0.123,-0.712 -0.266,-1.516 -0.428,-2.411 -0.244,-1.831 -0.549,-3.458 -0.916,-4.883 -0.365,-1.424 -0.549,-2.42 -0.549,-2.991 0,-0.244 0.051,-0.58 0.152,-1.007 0.102,-0.427 0.234,-0.854 0.396,-1.281 0.162,-0.428 0.346,-0.794 0.55,-1.099 0.203,-0.306 0.386,-0.458 0.55,-0.458 0.039,0 0.192,0.183 0.457,0.549 0.265,0.366 0.539,0.773 0.824,1.221 0.284,0.448 0.539,0.854 0.764,1.221 0.223,0.366 0.314,0.57 0.273,0.61 -0.326,0.285 -0.631,0.671 -0.915,1.16 -0.285,0.488 -0.427,1.201 -0.427,2.136 0,0.326 0.061,0.865 0.183,1.618 0.122,0.753 0.265,1.617 0.427,2.594 0.162,0.977 0.306,2.014 0.428,3.113 0.122,1.099 0.184,2.157 0.184,3.174 0,0.326 -0.011,0.753 -0.031,1.282 -0.021,0.529 -0.041,1.089 -0.061,1.679 -0.021,0.59 -0.061,1.18 -0.123,1.77 -0.061,0.59 -0.111,1.129 -0.152,1.618 0.977,-1.058 1.994,-2.054 3.053,-2.991 1.057,-0.936 2.105,-1.749 3.143,-2.441 1.037,-0.691 2.035,-1.23 2.99,-1.617 0.957,-0.387 1.821,-0.58 2.595,-0.58 1.383,0 2.451,0.458 3.204,1.373 0.751,0.914 1.127,2.003 1.127,3.264 z m -2.197,1.892 c 0,-0.284 -0.132,-0.559 -0.396,-0.824 -0.264,-0.265 -0.601,-0.488 -1.007,-0.672 -0.407,-0.183 -0.845,-0.335 -1.312,-0.458 -0.469,-0.122 -0.906,-0.183 -1.312,-0.183 -0.855,0 -1.74,0.092 -2.656,0.274 -0.914,0.184 -1.852,0.529 -2.807,1.038 -0.957,0.509 -1.902,1.211 -2.838,2.105 -0.938,0.896 -1.832,2.035 -2.686,3.418 2.645,-0.162 4.912,-0.478 6.805,-0.946 1.893,-0.467 3.449,-0.966 4.67,-1.495 1.221,-0.528 2.115,-1.017 2.686,-1.465 0.568,-0.446 0.853,-0.71 0.853,-0.792 z"
             id="path6313" />
        </g>
      </g>
    </g>
  </g>';
            }

            if($alphabetU == "&#1579;")
            {
                echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-152.1579,814.37611)"
       id="g6315">
      <g
         id="g6317">
        <g
           id="g6319">
          <path
             inkscape:connector-curvature="0"
             d="m 475.145,85.3 c 0,1.018 -0.092,2.146 -0.274,3.388 -0.184,1.241 -0.529,2.502 -1.038,3.784 -0.509,1.281 -1.251,2.523 -2.228,3.723 -0.977,1.201 -2.258,2.289 -3.845,3.266 -2.319,1.303 -5.015,2.502 -8.087,3.601 -3.072,1.099 -6.327,2.035 -9.766,2.808 -3.439,0.773 -6.968,1.374 -10.589,1.8 -3.622,0.428 -7.141,0.641 -10.559,0.641 -4.069,0 -7.681,-0.305 -10.834,-0.916 -3.153,-0.611 -5.809,-1.505 -7.965,-2.686 -2.157,-1.18 -3.794,-2.655 -4.913,-4.425 -1.12,-1.771 -1.679,-3.815 -1.679,-6.134 0,-1.261 0.274,-2.665 0.824,-4.211 0.549,-1.546 1.18,-2.991 1.892,-4.333 0.712,-1.342 1.394,-2.461 2.045,-3.357 0.65,-0.895 1.058,-1.343 1.221,-1.343 0.203,0 0.396,0.082 0.58,0.244 0.183,0.163 0.213,0.346 0.091,0.549 -0.163,0.285 -0.397,0.671 -0.702,1.16 -0.306,0.488 -0.601,1.059 -0.885,1.709 -0.285,0.651 -0.529,1.364 -0.732,2.136 -0.204,0.773 -0.305,1.608 -0.305,2.502 0,1.384 0.336,2.625 1.007,3.723 0.672,1.099 1.566,2.055 2.686,2.869 1.119,0.814 2.421,1.495 3.906,2.045 1.485,0.549 3.052,0.997 4.7,1.343 1.647,0.346 3.336,0.601 5.065,0.763 1.729,0.163 3.388,0.244 4.975,0.244 3.011,0 6.144,-0.173 9.399,-0.519 3.255,-0.346 6.459,-0.824 9.613,-1.435 3.153,-0.61 6.144,-1.302 8.972,-2.075 2.828,-0.772 5.32,-1.577 7.477,-2.411 2.156,-0.833 3.865,-1.688 5.127,-2.563 1.261,-0.875 1.892,-1.678 1.892,-2.411 0,-0.406 -0.183,-0.925 -0.549,-1.556 -0.366,-0.631 -0.784,-1.312 -1.251,-2.045 -0.467,-0.733 -0.885,-1.465 -1.251,-2.197 -0.366,-0.732 -0.549,-1.383 -0.549,-1.953 0,-0.406 0.112,-0.956 0.335,-1.648 0.224,-0.691 0.468,-1.404 0.732,-2.136 0.264,-0.732 0.539,-1.424 0.824,-2.075 0.284,-0.65 0.488,-1.139 0.61,-1.465 0.61,0.732 1.169,1.587 1.679,2.563 0.508,0.977 0.936,2.004 1.281,3.082 0.346,1.079 0.61,2.137 0.794,3.174 0.182,1.038 0.274,1.964 0.274,2.777 z M 448.167,70.713 c 0,0.163 -0.173,0.57 -0.519,1.221 -0.346,0.651 -0.753,1.333 -1.221,2.044 -0.468,0.712 -0.916,1.354 -1.343,1.923 -0.428,0.57 -0.723,0.854 -0.885,0.854 -0.082,0 -0.397,-0.193 -0.946,-0.58 -0.55,-0.386 -1.129,-0.824 -1.74,-1.312 -0.732,-0.569 -1.547,-1.2 -2.441,-1.892 -0.244,-0.203 -0.417,-0.284 -0.519,-0.244 -0.102,0.041 -0.234,0.163 -0.396,0.366 -0.651,0.854 -1.221,1.648 -1.709,2.38 -0.448,0.61 -0.865,1.16 -1.251,1.648 -0.387,0.488 -0.641,0.732 -0.763,0.732 -0.122,0 -0.479,-0.193 -1.068,-0.58 -0.59,-0.386 -1.211,-0.833 -1.862,-1.343 -0.651,-0.508 -1.242,-0.997 -1.77,-1.465 -0.529,-0.467 -0.793,-0.763 -0.793,-0.885 0,-0.122 0.193,-0.498 0.58,-1.129 0.387,-0.631 0.814,-1.292 1.282,-1.984 0.467,-0.691 0.915,-1.322 1.343,-1.892 0.427,-0.569 0.681,-0.854 0.763,-0.854 0.203,0 0.58,0.193 1.129,0.58 0.55,0.387 1.108,0.804 1.679,1.251 0.691,0.529 1.424,1.14 2.197,1.831 0.284,0.204 0.488,0.315 0.61,0.336 0.122,0.021 0.305,-0.132 0.549,-0.458 0.61,-0.854 1.16,-1.627 1.648,-2.319 0.447,-0.569 0.854,-1.099 1.221,-1.587 0.367,-0.488 0.61,-0.732 0.732,-0.732 0.122,0 0.478,0.193 1.068,0.58 0.589,0.387 1.21,0.824 1.861,1.312 0.65,0.488 1.241,0.957 1.77,1.404 0.529,0.449 0.794,0.713 0.794,0.794 z m -6.226,-10.62 c 0,0.163 -0.183,0.57 -0.549,1.221 -0.366,0.651 -0.773,1.333 -1.221,2.044 -0.448,0.712 -0.896,1.354 -1.343,1.923 -0.448,0.57 -0.753,0.854 -0.916,0.854 -0.082,0 -0.417,-0.193 -1.007,-0.58 -0.59,-0.386 -1.221,-0.824 -1.893,-1.312 -0.671,-0.488 -1.272,-0.966 -1.8,-1.434 -0.529,-0.468 -0.793,-0.783 -0.793,-0.946 0,-0.162 0.193,-0.559 0.58,-1.19 0.386,-0.63 0.824,-1.291 1.312,-1.983 0.488,-0.691 0.946,-1.312 1.374,-1.861 0.427,-0.55 0.681,-0.824 0.763,-0.824 0.162,0 0.549,0.193 1.16,0.58 0.611,0.387 1.23,0.824 1.862,1.312 0.63,0.488 1.2,0.957 1.709,1.404 0.508,0.447 0.762,0.711 0.762,0.792 z"
             id="path6321" />
        </g>
      </g>
    </g>
  </g>';
            }

            if($alphabetU == "&#1580;")
            {
                echo '<g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-752.36218)">
    <g
       transform="matrix(0.997,0,0,0.997,-74.516521,777.21294)"
       id="g6323">
      <g
         id="g6325">
        <g
           id="g6327">
          <path
             inkscape:connector-curvature="0"
             d="m 384.392,137.834 c 0,0.081 -0.499,0.336 -1.495,0.763 -0.998,0.428 -2.259,0.925 -3.784,1.496 -1.526,0.569 -3.215,1.18 -5.066,1.831 -1.852,0.65 -3.622,1.251 -5.31,1.8 -1.689,0.55 -3.185,0.997 -4.486,1.343 -1.303,0.346 -2.177,0.519 -2.625,0.519 -3.012,0 -5.992,-0.153 -8.942,-0.458 -2.95,-0.306 -5.758,-0.824 -8.423,-1.557 -2.665,-0.733 -5.147,-1.719 -7.446,-2.96 -2.299,-1.242 -4.283,-2.788 -5.951,-4.639 -1.669,-1.852 -2.981,-4.028 -3.937,-6.531 -0.956,-2.502 -1.434,-5.422 -1.434,-8.758 0,-3.784 0.508,-7.334 1.526,-10.651 1.017,-3.316 2.461,-6.388 4.333,-9.216 1.871,-2.828 4.129,-5.422 6.775,-7.782 2.645,-2.359 5.594,-4.476 8.85,-6.348 -0.448,-0.325 -1.129,-0.589 -2.044,-0.793 -0.916,-0.203 -1.862,-0.366 -2.838,-0.488 -0.976,-0.122 -1.892,-0.203 -2.747,-0.244 -0.854,-0.04 -1.465,-0.061 -1.831,-0.061 -1.384,0 -2.93,0.112 -4.639,0.336 -1.709,0.224 -3.215,0.56 -4.517,1.007 0,-0.162 0.051,-0.488 0.152,-0.977 0.101,-0.489 0.224,-1.027 0.366,-1.617 0.142,-0.59 0.285,-1.16 0.428,-1.709 0.142,-0.55 0.253,-0.946 0.335,-1.19 0.081,-0.325 0.447,-0.702 1.099,-1.129 0.65,-0.428 1.485,-0.834 2.502,-1.221 1.017,-0.387 2.146,-0.712 3.388,-0.977 1.241,-0.265 2.492,-0.397 3.753,-0.397 1.831,0 3.672,0.132 5.524,0.397 1.851,0.265 3.692,0.549 5.523,0.854 1.831,0.305 3.672,0.58 5.523,0.824 1.851,0.244 3.693,0.346 5.524,0.305 1.79,-0.081 3.58,-0.214 5.371,-0.396 1.79,-0.184 3.54,-0.275 5.249,-0.275 0.244,0 0.559,0.01 0.946,0.031 0.387,0.021 0.58,0.234 0.58,0.641 0,0.163 -0.143,0.54 -0.427,1.129 -0.285,0.59 -0.601,1.211 -0.946,1.862 -0.346,0.651 -0.692,1.231 -1.038,1.74 -0.346,0.509 -0.58,0.763 -0.702,0.763 -1.384,0.244 -3.042,0.509 -4.974,0.793 -1.933,0.285 -3.775,0.549 -5.524,0.793 -2.075,0.326 -4.313,0.875 -6.714,1.648 -2.401,0.773 -4.792,1.76 -7.171,2.96 -2.381,1.2 -4.66,2.604 -6.836,4.211 -2.177,1.608 -4.11,3.418 -5.799,5.433 -1.688,2.014 -3.031,4.211 -4.028,6.592 -0.997,2.38 -1.495,4.933 -1.495,7.66 0,3.174 0.528,5.951 1.587,8.332 1.058,2.38 2.502,4.435 4.333,6.164 1.831,1.729 3.957,3.153 6.378,4.272 2.42,1.119 4.984,2.015 7.69,2.686 2.706,0.672 5.472,1.139 8.301,1.404 2.828,0.264 5.563,0.396 8.209,0.396 1.505,0 3.133,-0.071 4.883,-0.214 1.749,-0.143 3.458,-0.295 5.127,-0.458 1.668,-0.163 3.225,-0.315 4.669,-0.458 1.444,-0.143 2.634,-0.214 3.571,-0.214 0.449,0.001 0.674,0.245 0.674,0.733 z m -24.475,-25.329 c 0,0.162 -0.183,0.559 -0.549,1.19 -0.366,0.631 -0.784,1.302 -1.251,2.015 -0.468,0.711 -0.926,1.352 -1.374,1.922 -0.448,0.569 -0.773,0.854 -0.977,0.854 -0.082,0 -0.417,-0.183 -1.007,-0.549 -0.59,-0.366 -1.221,-0.784 -1.892,-1.251 -0.672,-0.468 -1.272,-0.926 -1.801,-1.374 -0.529,-0.448 -0.793,-0.753 -0.793,-0.916 0,-0.163 0.193,-0.56 0.58,-1.19 0.387,-0.63 0.814,-1.302 1.282,-2.014 0.467,-0.712 0.925,-1.354 1.373,-1.923 0.447,-0.57 0.732,-0.854 0.854,-0.854 0.162,0 0.549,0.193 1.16,0.58 0.61,0.386 1.241,0.824 1.892,1.312 0.65,0.488 1.23,0.956 1.739,1.404 0.509,0.448 0.764,0.712 0.764,0.794 z"
             id="path6329" />
        </g>
      </g>
    </g>
  </g>';
            }


            }           

}
?>
<?php
    $alphabetU = $_POST['inpUrdu'];
    if(isset($alphabetU))
    {
     echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
     echo ' ';
     echo '<!DOCTYPE svg SYSTEM "C:\\xampp\\htdocs\\Ruka\\includes\\svg10.dtd">';
     echo '<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"
        xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
        xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
        id="svg1"
        sodipodi:version="0.32"
        inkscape:version="0.46"
        version="1.0"
        sodipodi:docname="test.svg"
       inkscape:output_extension="org.inkscape.output.svg.inkscape">';
     echo '<text x="100" y="100">';



        processalphabet();



     echo '</text>';
     echo '</svg>';
    }

else
{
        echo '<text>No Chracter Recived</text>';
}
?>

NOTE: Make sure in PHP file there is no line break/extra new line between/before/after php delimater <?php ?> else it will give error to genrate xml...and due to Text Limitation i only gave first 7 Urdu Alphabets Path ا،ب،پ،ت،ٹ and so on...

Happy Ending Hope that will help Insha'Allh...!!