Belval / TextRecognitionDataGenerator

A synthetic data generator for text recognition
MIT License
3.15k stars 943 forks source link

tibeten generating(ligature)issue #309

Closed Paul-bl closed 1 year ago

Paul-bl commented 1 year ago

I noticed that the ligature functionality seems to be not working as expected. Regardless of the font I use, the ligatures do not appear in the generated data. For example: imageshould beimagebut the generator output is image, it just simply put character together.

Paul-bl commented 1 year ago

I have fixed it, I need to add font_size,layout_engine="rapm" argument when loading font, to use ramp I need to install it by pip. in funtion def _generate_horizontal_text() of computer_text_generator.py image_font = ImageFont.truetype(font=font, size=font_size) ->image_font = ImageFont.truetype(font=font, size=font_size,layout_engine="rapm")