如何在 iText 7 中为字母上方的泰国双标记设置 GPOS

How to set GPOS in iText 7 for thailand double mark above the letter

我需要有关如何在 iText 7 中为泰国字母上方的双标记设置 GPOS 的建议。

PdfDocument pdf = new PdfDocument(new PdfReader(src), new PdfWriter(dest));
PdfAcroForm form = PdfAcroForm.getAcroForm(pdf, true);
PdfFont fontLoad = PdfFontFactory.createFont(font, PdfEncodings.IDENTITY_H);
form.getField("Text1").setValue("ตั้", fontLoad,20);
form.flattenFields();
pdf.close();

实际结果

预期结果

要获得额外的 positioning/interaction(参见:ligatures) information from the font file, you would need pdfCalligraph,一个 iText 7 Core 附加组件。

没有 pdfCalligraph,我得到:

在 pdfCalligraph 中,我得到:

我相信这就是您要找的。