diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java index 845fe43d9e..62dc92a2d0 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTextArea.java @@ -59,8 +59,10 @@ public class XTextArea extends XFieldEditor { TextArea area = (TextArea) data; if (area.getWidgetValue() != null) { Graphics2D g2d = (Graphics2D) g.create(); + FRFont font = FRFont.getInstance(); + float fontsize = (float) (font.getSize() * this.getScale()); BaseUtils.drawStringStyleInRotation(g2d, this.getWidth(), this.getHeight(), area.getWidgetValue() - .toString(), Style.getInstance(FRFont.getInstance()).deriveHorizontalAlignment(Constants.LEFT) + .toString(), Style.getInstance(font.applySize(fontsize)).deriveHorizontalAlignment(Constants.LEFT) .deriveVerticalAlignment(SwingConstants.TOP) .deriveTextStyle(Style.TEXTSTYLE_WRAPTEXT), ScreenResolution.getScreenResolution()); } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java index 00daae7c7d..8106653e2e 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XTextEditor.java @@ -67,8 +67,10 @@ public class XTextEditor extends XWrapperedFieldEditor { TextEditor area = (TextEditor) data; if (area.getWidgetValue() != null) { Graphics2D g2d = (Graphics2D) g.create(); + FRFont font = FRFont.getInstance(); + float fontsize = (float) (font.getSize() * this.getScale()); BaseUtils.drawStringStyleInRotation(g2d, this.getWidth(), this.getHeight(), area.getWidgetValue() - .toString(), Style.getInstance(FRFont.getInstance()).deriveHorizontalAlignment(Constants.LEFT) + .toString(), Style.getInstance(font.applySize(fontsize)).deriveHorizontalAlignment(Constants.LEFT) .deriveTextStyle(Style.TEXTSTYLE_SINGLELINE), ScreenResolution.getScreenResolution()); } }