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/09/26 19:27:58 UTC
svn commit: r1938546 - in pdfbox/trunk: pdfbox-layout-awt/src/main/java/org/apache/pdfbox/glyphlayout/awt pdfbox-layout-awt/src/test/java/org/apache/pdfbox/glyphlayout/awt pdfbox/src/main/java/org/apache/pdfbox/pdmodel
Author: tilman
Date: Sat Sep 26 19:27:57 2026
New Revision: 1938546
Log:
PDFBOX-6256: fix formatting / remove super() / fix javadoc / Sonar fix
Modified:
pdfbox/trunk/pdfbox-layout-awt/src/main/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutProcessorAwt.java
pdfbox/trunk/pdfbox-layout-awt/src/test/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutLigaturesAndKerningTest.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/AbstractGlyphLayoutProcessor.java
Modified: pdfbox/trunk/pdfbox-layout-awt/src/main/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutProcessorAwt.java
==============================================================================
--- pdfbox/trunk/pdfbox-layout-awt/src/main/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutProcessorAwt.java Sat Sep 26 19:10:19 2026 (r1938545)
+++ pdfbox/trunk/pdfbox-layout-awt/src/main/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutProcessorAwt.java Sat Sep 26 19:27:57 2026 (r1938546)
@@ -54,6 +54,7 @@ public class GlyphLayoutProcessorAwt ext
/**
* Constructs a GlyphLayoutProcessorFop with options
*
+ * @param options
*/
public GlyphLayoutProcessorAwt(AbstractGlyphLayoutProcessor.GlyphLayoutProcessorOptions options)
{
Modified: pdfbox/trunk/pdfbox-layout-awt/src/test/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutLigaturesAndKerningTest.java
==============================================================================
--- pdfbox/trunk/pdfbox-layout-awt/src/test/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutLigaturesAndKerningTest.java Sat Sep 26 19:10:19 2026 (r1938545)
+++ pdfbox/trunk/pdfbox-layout-awt/src/test/java/org/apache/pdfbox/glyphlayout/awt/GlyphLayoutLigaturesAndKerningTest.java Sat Sep 26 19:27:57 2026 (r1938546)
@@ -139,8 +139,7 @@ class GlyphLayoutLigaturesAndKerningTest
String outputBaseName = String.format("GlyphLayoutLigaturesAndKerning%s", sActualText);
String outputPDFFilename = "target/" + outputBaseName + ".pdf";
- String outputTextFilename = String.format("target/" + outputBaseName + ".txt");
-
+ String outputTextFilename = String.format("target/%s.txt", outputBaseName);
String firaPath = "/ttf/FiraCode-Regular.ttf";
String dejavuPath = "/ttf/DejaVuSans.ttf"; // ligatures not in Liberation nor in Arimo
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/AbstractGlyphLayoutProcessor.java
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/AbstractGlyphLayoutProcessor.java Sat Sep 26 19:10:19 2026 (r1938545)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/AbstractGlyphLayoutProcessor.java Sat Sep 26 19:27:57 2026 (r1938546)
@@ -102,7 +102,7 @@ public abstract class AbstractGlyphLayou
*
* @param options Options for creation
*/
- public AbstractGlyphLayoutProcessor(GlyphLayoutProcessorOptions options)
+ protected AbstractGlyphLayoutProcessor(GlyphLayoutProcessorOptions options)
{
useActualText = options.useActualText;
}
@@ -110,7 +110,7 @@ public abstract class AbstractGlyphLayou
/**
* Creates an AbstractGlyphLayoutProcessor with standard options
*/
- public AbstractGlyphLayoutProcessor()
+ protected AbstractGlyphLayoutProcessor()
{
useActualText = false;
}
@@ -123,6 +123,7 @@ public abstract class AbstractGlyphLayou
* @param text text
* @param bidiLevel Bidi Level
* @return string width
+ * @throws java.io.IOException
*/
protected abstract float getStringWidthUni(PDType0Font font, float fontSize, String text, int bidiLevel)
throws IOException;
@@ -134,7 +135,9 @@ public abstract class AbstractGlyphLayou
* @param fontSize font size
* @param text text
* @return string width
+ * @throws java.io.IOException
*/
+ @Override
public float getStringWidth(PDType0Font font, float fontSize, String text) throws IOException
{
float width = 0f;
@@ -164,6 +167,7 @@ public abstract class AbstractGlyphLayou
/**
* End a marked content sequence.
*
+ * @param contentStream
* @throws IOException If the content stream could not be written
*/
protected void endMarkedContent(ContentStreamForGlyphLayoutInterface contentStream) throws IOException
@@ -197,6 +201,7 @@ public abstract class AbstractGlyphLayou
* @throws IOException if an I/O exception occurs
* @throws IllegalArgumentException if glyphs are missing
*/
+ @Override
public void showText(ContentStreamForGlyphLayoutInterface contentStream, PDType0Font font, float fontSize, String text)
throws IOException
{