You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2026/10/21 15:03:01 UTC
svn commit: r1939312 - in pdfbox/trunk/pdfbox-layout-fop/src/test: java/org/apache/pdfbox/glyphlayout/fop resources/pdf
Author: tilman
Date: Wed Oct 21 15:03:01 2026
New Revision: 1939312
Log:
PDFBOX-4951: add NotoSansBengali to the test, as suggested by Simon Steiner; remove outdated comment
Modified:
pdfbox/trunk/pdfbox-layout-fop/src/test/java/org/apache/pdfbox/glyphlayout/fop/GlyphLayoutLigaturesAndKerningTest.java
pdfbox/trunk/pdfbox-layout-fop/src/test/resources/pdf/GlyphLayoutLigaturesAndKerning.pdf
Modified: pdfbox/trunk/pdfbox-layout-fop/src/test/java/org/apache/pdfbox/glyphlayout/fop/GlyphLayoutLigaturesAndKerningTest.java
==============================================================================
--- pdfbox/trunk/pdfbox-layout-fop/src/test/java/org/apache/pdfbox/glyphlayout/fop/GlyphLayoutLigaturesAndKerningTest.java Wed Oct 21 12:02:28 2026 (r1939311)
+++ pdfbox/trunk/pdfbox-layout-fop/src/test/java/org/apache/pdfbox/glyphlayout/fop/GlyphLayoutLigaturesAndKerningTest.java Wed Oct 21 15:03:01 2026 (r1939312)
@@ -89,6 +89,7 @@ class GlyphLayoutLigaturesAndKerningTest
String dejavuPath = "/ttf/DejaVuSans.ttf"; // ligatures not in Liberation nor in Arimo
String thaiPath = "/ttf/NotoSansThai-Regular.ttf";
String lohitBengaliPath = "/ttf/Lohit-Bengali.ttf";
+ String notoBengaliPath = "/ttf/NotoSansBengali-Regular.ttf";
float fontSize = 12.0f;
@@ -109,6 +110,8 @@ class GlyphLayoutLigaturesAndKerningTest
PDType0Font lohitBengaliFont = createPdType0Font(glyphLayoutProcessor, doc, lohitBengaliPath);
+ PDType0Font notoBengaliFont = createPdType0Font(glyphLayoutProcessor, doc, notoBengaliPath);
+
PDPage page = new PDPage();
doc.addPage(page);
try (PDPageContentStream cs = new PDPageContentStream(doc, page))
@@ -125,15 +128,24 @@ class GlyphLayoutLigaturesAndKerningTest
y = showComposites(cs, dejavuLigKernFont, fontSize, x, y, DEJAVU_STRING + " (Ligatures and kerning)");
y = showComposites(cs, thaiFont, fontSize, x, y, THAI_STRING);
y = showComposites(cs, lohitBengaliFont, fontSize, x, y - 5, BENGALI_STRING + " (ভারত)");
+ y = showComposites(cs, notoBengaliFont, fontSize, x, y - 5, BENGALI_STRING + " (ভারত)");
- // from the related awt test. Unclear if useful in the future if FOP ever supports bengali
- // and we get access to it.
+ // from the related awt test. (not yet correct, see FOP-3361)
cs.beginText();
cs.setFont(lohitBengaliFont, 20);
cs.newLineAtOffset(x, y - 20);
cs.showText(BENGALI_STRING2);
cs.showText(" ");
cs.showText(BENGALI_STRING2);
+ cs.endText();
+
+ // from the related awt test.
+ cs.beginText();
+ cs.setFont(notoBengaliFont, 20);
+ cs.newLineAtOffset(x, y - 50);
+ cs.showText(BENGALI_STRING2);
+ cs.showText(" ");
+ cs.showText(BENGALI_STRING2);
cs.endText();
}
doc.save(outputFilename);
Modified: pdfbox/trunk/pdfbox-layout-fop/src/test/resources/pdf/GlyphLayoutLigaturesAndKerning.pdf
==============================================================================
Binary file (source and/or target). No diff available.