Skip to content

Commit 5568978

Browse files
committed
PDFBOX-1529: allow float font size parameter, as suggested by Dave Powell
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922734 13f79535-47bb-0310-9956-ffa450edef68
1 parent 789eaad commit 5568978

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tools/src/main/java/org/apache/pdfbox/tools/TextToPDF.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class TextToPDF implements Callable<Integer>
5858
/**
5959
* The default font size
6060
*/
61-
private static final int DEFAULT_FONT_SIZE = 10;
61+
private static final float DEFAULT_FONT_SIZE = 10;
6262

6363
/**
6464
* The line height as a factor of the font size
@@ -72,9 +72,9 @@ public class TextToPDF implements Callable<Integer>
7272
@SuppressWarnings("squid:S106")
7373
private final PrintStream SYSERR;
7474

75-
@Option(names = "-fontSize", description = "the size of the font to use (default: ${DEFAULT-VALUE}")
76-
private int fontSize = DEFAULT_FONT_SIZE;
77-
75+
@Option(names = "-fontSize", description = "the size of the font to use (default: ${DEFAULT-VALUE})")
76+
private float fontSize = DEFAULT_FONT_SIZE;
77+
7878
@Option(names = "-landscape", description = "set orientation to landscape")
7979
private boolean landscape = false;
8080

@@ -399,17 +399,18 @@ public void setFont(PDFont aFont)
399399
{
400400
this.font = aFont;
401401
}
402+
402403
/**
403404
* @return Returns the fontSize.
404405
*/
405-
public int getFontSize()
406+
public float getFontSize()
406407
{
407408
return fontSize;
408409
}
409410
/**
410411
* @param aFontSize The fontSize to set.
411412
*/
412-
public void setFontSize(int aFontSize)
413+
public void setFontSize(float aFontSize)
413414
{
414415
this.fontSize = aFontSize;
415416
}

0 commit comments

Comments
 (0)