saurabhdaware / text-to-handwriting

So your teacher asked you to upload written assignments? Hate writing assigments? This tool will help you convert your text to handwriting xD
https://saurabhdaware.github.io/text-to-handwriting/
MIT License
4.71k stars 1.13k forks source link

Hindi font not working on copy paste #76

Open saurabhdaware opened 4 years ago

saurabhdaware commented 4 years ago

Describe the bug The font works when you type it with the keyboard but does not work when you copy-paste from a different website. This is probably happening because of different Unicode so the font taken from Wikipedia, has different characters than the characters it get from typing.

Not really sure how we can fix this

To Reproduce Steps to reproduce the behavior:

  1. Go to Wikipedia and copy any hindi font
  2. Paste it in textarea. The handwritten font will be replaced with a normal text
prafulla-codes commented 3 years ago

I'll try to work on this

saurabhdaware commented 3 years ago

Yeah sure @Pika1998 not quite sure how to solve this though so we will have to figure it out

prafulla-codes commented 3 years ago

I did try to debug it, but it seems this problem is unsolvable because I think the general characters used in Hindi_Font and the font used in Wikipedia are made up of different characters

Here is a possible solution We use an intermediary translation tool (Perhaps an API which translates our copied clipboard text to English & then we try to convert that to some general hindi font which supports all characters typed using English) I hope it makes sense lol.

saurabhdaware commented 3 years ago

yeah that makes sense. Will need to find something that does that for us