[smc-discuss] Displaying proper malayalam text on PDF using Go lang gopdf

Jeffrey Antony jeffreyantony at gmail.com
Tue Feb 4 03:59:29 PST 2020


Hello Rakesh,

Thanks for the reply.

Is there any implementation in "c" or python for this complex text layout
in Malayalam so that I can port to Go ?

Thanks
Jeffrey


On Tue, 4 Feb 2020, 12:51 Rajeesh K V, <rajeeshknambiar at gmail.com> wrote:

>
>> I am trying to generate a PDF document with Malayalam text using go
>> language.
>> For this I am using the go pdf library
>> https://github.com/signintech/gopdf
>> The issue is that the malayalam text is not displayed properly.
>>
>> Good Text (as you all know)
>> https://i.stack.imgur.com/KN5m1.png
>>
>> Obtained Text from gopdf (Improper Text)
>> https://i.stack.imgur.com/xLN8r.png
>>
>
> Well, the ‘text’ is proper (in the sense that Unicode code points are
> correct). The PDF generating library is missing ‘Complex Text Layout’
> support, which is required to shape Malayalam script properly.
>
>
>> Does anyone know how to fix the issue ?
>>
>
> You’d need to ‘shape’ the text either before passing to the library or the
> library should internally handle it. I doubt if there’s a Go library which
> does CTL shaping. PDF document only deals with ‘glyph ids’, so you’d need
> to have proper glyph ids in place correctly.
>
>
> --
> Rajeesh
> https://rajeeshknambiar.wordpress.com
>
> _______________________________________________
> Swathanthra Malayalam Computing discuss Mailing List
> Project: https://savannah.nongnu.org/projects/smc
> Web: http://smc.org.in | IRC : #smc-project @ freenode
> discuss at lists.smc.org.in
> http://lists.smc.org.in/listinfo.cgi/discuss-smc.org.in
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.smc.org.in/pipermail/discuss-smc.org.in/attachments/20200204/16aec7c0/attachment-0002.html>


More information about the discuss mailing list