photopea / Typr.js

Typr.js - process fonts in Javascript
MIT License
914 stars 73 forks source link

Devanagri script/Hindi language ligatures not rendering correctly #48

Closed CATALYST1109 closed 11 months ago

CATALYST1109 commented 11 months ago

Hi! I tried rendering Devanagri ligatures on the demo page and noticed that they are not rendering correctly as shown below. I used the fonts Noto Sans and Mangal Regular, which do support that script. Is this something that typr doesn't support at the moment( I noticed GSUB and GPOS were commented out in typr's code on lines 27 and 28) or am I just doing something wrong?

Context behind me pointing out GSUB and GPOS -- jspdf issue. I came here looking for a library that is able to handle such ligatures, to see if I can somehow port jspdf to use that instead of its own implementation, so I thought I'd inquire about the issue in hopes that it's an user error.

Thanks!

typr

photopea commented 11 months ago

Hi, sadly, Typr.js does not have any advanced shaping capabilities. I recommend using the Harfbuzz library for shaping, see https://github.com/photopea/Typr.js#shaping-with-harfbuzz

CATALYST1109 commented 11 months ago

Ok, thanks for your time !