如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

huangapple go评论59阅读模式
英文:

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();

实际结果

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

期望结果

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

英文:

I need advice how to set GPOS in iText 7 for Thailand double mark above the letter.

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();

Actual Result

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

Expected result

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

答案1

得分: 1

要从字体文件获取额外的定位/交互信息(参见:连字),您需要使用iText 7 Core附加组件pdfCalligraph

没有pdfCalligraph,我得到:

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

而有了pdfCalligraph,我得到:

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

我相信这就是您所寻找的。

英文:

To get that extra positioning/interaction (see: ligatures) information from the font file, you would need pdfCalligraph, an iText 7 Core add-on.

Without pdfCalligraph, I get:

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

where with pdfCalligraph, I get:

如何在iText 7中设置GPOS以在泰国字母上方添加双重标记?

Which I believe is what you are looking for.

huangapple
  • 本文由 发表于 2020年7月29日 22:28:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/63155927.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定