-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Myanmar font is not being rendered correctly #1125
Comments
Note: The result is same with Noto Serif Myanmar fonts. |
Could you please confirm, that incorrect rendering can be caused by the lack of ligatures? |
Thanks @pointlessone for your response. Generally in the text editors or word processors, the combination happens automatically. To get
Regards, |
Hi @pointlessone , I raised an issue to one of the font developer, however, they think that this might be a problem with library/platform I am using, the library/platform might not be reordering or resolving viramas, etc. Please see more at silnrsi/font-padauk#30 (comment) I am having this same problem with all Unicode fonts we have for our language. Some fonts have more rendering issue while some have with less. I just do not know where to start, and how to further this thing. |
@pmverma In the link you referenced is the mention of font shaping. Prawn doesn't do font shaping since that is quite a complex topic. So if the combination is done through font shaping and not through simple ligatures, you won't get correct results in Prawn, for no font. However, there is ongoing work to bring OTF support to the library "ttfunk" Prawn is using for fonts. Once this has landed it might be easier to implement font shaping in Prawn. But for now this won't work. |
Even if it's done with ligatures it won't work either. TTFunk strips all ligature glyphs during subsetting. |
@pointlessone Really? But how does it do ligatures like 'll' then? |
Ah, you are right, I thought about kerning which Prawn supports. The standard 14 PDF fonts partially support ligatures, e.g. Times-Roman supports |
Standard fonts are just the ones Adobe promised to always have with their software installed. Since they're pre-installed and not processed by TTFunk they might have all sorts of ligatures and not suffer from subsetting issues. |
Thanks both @gettalong & @gettalong for your inputs. Basically I am generating pdf using https://github.com/asciidoctor/asciidoctor-pdf which depends on prawnpdf. Now I understand I am out of luck here. Regards, |
There's a consensus that this feature is desired but no concrete plans for the implementation that I'm aware of. I'll be happy to accept a contribution. |
Thanks @pointlessone . However, can you please let me know some resources to understand the issue?
Regards, |
Ended up here using Asciidoctor, too, and realizing the lack of ligatures available in the TTF Font (Vollkorn via Google Fonts) not being used. Just as @pmverma, I'd be happy to help but without a few initial pointers it's gonna be hard for me to actually get started. |
@odrotbohm, Can you please let me know what was your workaround? Or did you stop using this library? For me, Here is what I have been doing,
However, with this approach, I lose all the Regards, |
There was no workaround for me. Combinations like "fi" are just rendered as two separate letters, not the corresponding ligature. |
My workaround is to build a new fonte without ligatures… For instance, in this new fonte, let's say "Ligaturae.ttf", I build the "F" glyph with the well-known ligatured "fi". Then, in Prawn: pdf.update do
text("<font name="Ligaturae">F</font>",
**{inline_format: true})
# write ligatured "fi" in the pdf document
end Of course, with a lot of ligatures, it's a lot of work…
|
Hi,
I have following text.
Following is the rendered pdf which is not correct.
I have attached the font I used.
PYIDAUNGSU-2.5_REGULAR.TTF.zip
Let me know what can I help you more.
Regards,
Mohan
The text was updated successfully, but these errors were encountered: