title: How to find width of each character in pixels using javascript
body: <p>consider </p>
  
  <pre><code>&lt;div&gt;manmadhan&lt;/div&gt;
  </code></pre>
  
  <p>I need to know whether there is any possible way to find the width of each character in pixels based on the font , as i am using react app i need only javascript</p>
  
  <p>the output should be like m=12px, n=24 pixel
  something like that
  I have tried to separate the text and try using the get bounds but empty space has some problem , any suggestion ?</p>
  
  <p>i have already tried the following method , but it is giving me width of whole string rather than width of individual characters within the string 
  <a href="https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript">Calculate text width with JavaScript</a></p>