TextRecognitionDataGenerator icon indicating copy to clipboard operation
TextRecognitionDataGenerator copied to clipboard

rupee symbol not appearing properly

Open ashit12 opened this issue 5 years ago • 5 comments

i was trying to generate images that have the rupee symbol(₹) in them. However, the symbol does not appear properly in the images. Sometimes the symbol is there, sometimes there is a box, and other times there is nothing.

ashit12 avatar Jul 14 '20 16:07 ashit12

Hi!

This is caused by the rupee symbol not being part of most fonts. I would suggest building your own set of fonts and using the --font_dir option.

Hopefully that helps.

Belval avatar Jul 14 '20 16:07 Belval

in the TRDG directory, as a test, I selected Aller_Bd.ttf font and generated images having the rupee symbol. How is it that for the same font, three different outcomes are seen? Should it not be the same for all cases? I am attaching the images I generated. 0 2 5

ashit12 avatar Jul 15 '20 08:07 ashit12

This is not the same font, can you paste the command you used to generate these?

Thank you.

Belval avatar Jul 15 '20 23:07 Belval

This is the command I used - python3 run.py -c 100 -i price_inp -fd fonts/latin -ft Aller_Bd.ttf -f 60 -na 2 --output_dir sk

ashit12 avatar Jul 16 '20 04:07 ashit12

The -fdparameter overrides the -ft one so you want either:

-ft fonts/latin/Aller_Bd.ttf

OR

-fd fonts/your_directorywhere your_directory contains only the fonts you know support the rupee symbol.

Belval avatar Jul 16 '20 20:07 Belval