File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
debugger/src/main/java/org/apache/pdfbox/debugger/ui Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1717
1818import java .awt .Color ;
1919import java .awt .Container ;
20+ import java .awt .Font ;
2021import java .awt .Frame ;
2122import java .io .PrintWriter ;
2223import java .io .StringWriter ;
3132import javax .swing .text .StyleConstants ;
3233import javax .swing .text .StyledDocument ;
3334
35+ import org .apache .pdfbox .debugger .PDFDebugger ;
36+
3437/**
3538 * Custom log dialog.
3639 *
@@ -55,6 +58,13 @@ private LogDialog(Frame owner, JLabel logLabel)
5558 this .logLabel = logLabel ;
5659
5760 textPane = new JTextPane ();
61+ String prop = PDFDebugger .configuration .getProperty ("textFontHeight" );
62+ if (prop != null )
63+ {
64+ Font font = textPane .getFont ();
65+ float textFontHeight = Float .parseFloat (prop );
66+ textPane .setFont (font .deriveFont (textFontHeight ));
67+ }
5868 scrollPane = new JScrollPane (textPane );
5969 getContentPane ().add (scrollPane );
6070
Original file line number Diff line number Diff line change 2323import javax .swing .JScrollPane ;
2424import javax .swing .JTextPane ;
2525
26+ import org .apache .pdfbox .debugger .PDFDebugger ;
27+
2628/**
2729 * Window for text extraction result.
2830 *
@@ -41,8 +43,13 @@ private TextDialog(Frame owner)
4143 super (owner );
4244
4345 textPane = new JTextPane ();
44- Font font = textPane .getFont ();
45- textPane .setFont (font .deriveFont (font .getSize2D () * 1.5f ));
46+ String prop = PDFDebugger .configuration .getProperty ("textFontHeight" );
47+ if (prop != null )
48+ {
49+ Font font = textPane .getFont ();
50+ float textFontHeight = Float .parseFloat (prop );
51+ textPane .setFont (font .deriveFont (textFontHeight ));
52+ }
4653 scrollPane = new JScrollPane (textPane );
4754 getContentPane ().add (scrollPane );
4855 pack ();
You can’t perform that action at this time.
0 commit comments