Open MayankFawkes opened 7 months ago
This may relate to locale info. The shaping needs to know how the glyph relationships should be interpreted, which can vary based on locale or other environment outside the font definition.
I can't recall immediately how it's passed in to GoText, but I have seen the same sort of challenges in writing the go-text/render
component.
Hi @MayankFawkes,
Thank you for your question. As you might have guessed, you encounter a typical text shaping problem. Several languages/scripts, like Arabic or Hindi, require complex layout rules to properly display text. This is the issue Harfbuzz solves.
From what I've read, gopdf does not use such a shaper, and thus won't be able to display Hindi text.
The go-text/typesetting module provides the appropriate tooling to handle such complex scripts : the low level shaping is done in the harfbuzz
package, and an higher level API is provided in shaping
.
This library is definitively designed to be included in others projects, so, if there is some interest, we would be glad to collaborate with gopdf to help them leverage go-text.
Hey i just wanted to know can we use this with gopdf cause i am having some rendering problem for hindi
Incorrent rendering Hindi fonts https://hindi-fonts.com/fonts/mangal-regular
If yes, then please help me fix this code.
Output
Expected