0

To animate a text in a similiar way like this, I need to get all the pixels of a given text. I need the pixels to start animating from left to right along all letters of the word.

So my question: Is there a way to write a function that takes a font and a string and returns an array of pixel coordinates.

I have tried to 'draw' my own pixels and use the coordinates, but it doesnt look very good and authentic. I have also looked for equations that look like letters to use.

I am trying to do this in an Ionic Angular App, so I can't use Canvas.

R4yY
  • 112
  • 13
  • Maybe you are looking for position of a Dom element relative to the browser window such as in this SO qn - https://stackoverflow.com/questions/442404/retrieve-the-position-x-y-of-an-html-element-relative-to-the-browser-window ? – theFrontEndDev Dec 21 '20 at 13:57
  • No, Im looking for a way to get all pixels of a string so I can draw the text in the DOM – R4yY Dec 21 '20 at 14:00
  • Canvas was my first guess. I don't think it is possible without guess without using server technology – yunzen Dec 21 '20 at 14:00
  • It's a static text so I could generate the pixels in a different language, but which one should I use to do that? – R4yY Dec 21 '20 at 14:03
  • As you say it is a static text, can't you still use Canvas in a different app to get your pixels ? – bossno Dec 21 '20 at 14:07
  • Why not use an SVG and animate it's path? – Reyno Dec 21 '20 at 14:09
  • I am doind this same thing but using canvas... if anyone has the indexes positions for the letters it would help me – Erick de Vathaire Sep 26 '21 at 21:50

0 Answers0