pymupdf / PyMuPDF

PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
https://pymupdf.readthedocs.io
GNU Affero General Public License v3.0
5.27k stars 502 forks source link

Tibetan rendering amiss despite attempts with multiple fonts #1028

Closed julkamny closed 3 years ago

julkamny commented 3 years ago

Hello,

First of all thanks for this amazing library, it has helped me achieve things I believed far beyond my ken. I am attempting to output a PDF which contains Tibetan words. For detailed information about the script used to write this language, please take a look at : https://docs.microsoft.com/en-us/typography/script-development/tibetan#examples-of-tibetan. Your help would be greatly appreciated, I have spent many hours crafting my program, it works well and could have interesting educational benefits, this font issue really bogs me down... 🙏🏿

The issue

doc[0].insertTextbox(rect, "རྒྱསྒྲ", fontsize = fontsize, fontname="jomolhari", fontfile = jomolhari_font_path) produces the attached picture, whereas it should produce well, what hopefully you see on your screen : a neatly arranged stack of ར + ག + ཡ (the form of this last consonant changes when it is placed at the bottom of a stack) and a neatly arranged stack of ས + ག + ར. Even གྲ is not properly displayed.

Capture d’écran 2021-04-21 à 17 38 52

My attempts

My configuration

JorjMcKie commented 3 years ago

This is not a bug - at best a feature you are missing. let me convert this to an item in topic "Discussions".