~ireas/public-inbox

1

Re: i18n Support

Details
Message ID
<CAMxHoFqMbcV26R0jqb9iagqVznT5tjxmANfBTGJPhXjLJLKygw@mail.gmail.com>
DKIM signature
pass
Download raw message
Hi.

I am not sure if it is the same problem. My problem is, my example
wrok nice with english character. But when i add turkish special
character(like şÇöÖüÜİı) browser can not render the pdf.
// this does notwork
doc.push(elements::Paragraph::new("aişş"));
doc.push(elements::Break::new(1));
// this work

doc.push(elements::Paragraph::new("ai"));
doc.push(elements::Break::new(1));

Re: i18n Support

Details
Message ID
<20210724175654.GB1179@ireas.org>
In-Reply-To
<CAMxHoFqMbcV26R0jqb9iagqVznT5tjxmANfBTGJPhXjLJLKygw@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
Hi Mehmet,

On 2021-07-24 20:47:17, Mehmet ERİBOL wrote:
> I am not sure if it is the same problem. My problem is, my example
> wrok nice with english character. But when i add turkish special
> character(like şÇöÖüÜİı) browser can not render the pdf.

This should work fine.  But note that there are two types of fonts in
PDF:  built-in and embedded.  Built-in fonts only support the
Windows-1252 character set which does not contain the Turkish
characters.  To use UTF-8 strings, you have to embed the font into the
PDF file.  This means that you have to set the second argument for
FontData::load to None.

If this does not fix the issue, please send me a minimum example so that
I can reproduce the problem.

Best,
Robin
Reply to thread Export thread (mbox)