Hello, I am writing to request assistance with modifying the encoding rules for Devanagari script in the PDFBox library. Our team is working on a research-based project that involves coding a rendering engine/library for Nepali Devanagari script in PDF documents using Scala programming language and the PDFBox library.
We have encountered issues with the current encoding rules for Devanagari script in the library. that we are trying to solve The script is not rendering properly in the PDF documents generated by our program, and we suspect that this issue may be due to the encoding rules. For Instance when we run this program public class App { public static void main(String args[]) throws Exception { PDDocument document = new PDDocument(); PDPage page = new PDPage(); document.addPage(page); PDPageContentStream contentStream = new PDPageContentStream(document, page); PDFont unicodeFont = PDType0Font.load(document, new File("arial-unicode-ms.ttf")); contentStream.setFont(unicodeFont, 14); contentStream.beginText(); contentStream.moveTextPositionByAmount(100, 200); contentStream.drawString("नेपालीहरू फिनल्याण्डमा राष्ट्रिय"); contentStream.endText(); contentStream.beginText(); contentStream.moveTextPositionByAmount(100, 300); contentStream.endText(); contentStream.close(); document.save("test.pdf"); document.close(); } The resulting output is as follows [image: image.png] PDF box doesn't replace for half consonants and displays the order of the left dependent vowel incorrectly(for this particular example; there are much more issues) We would greatly appreciate any guidance on where in the PDFBox library code we can modify the encoding rules for the Devanagari script since it would save us a lot of time and effort. Thank you very much for your help and support. We look forward to hearing back from you soon. Regards Ruel Shakya