From 586304609b98436fc34ed0f1f456d4ddd08c061f Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 12 Aug 2016 17:42:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E6=96=87=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=94=A8MS=20Mincho=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=EF=BC=88=E4=B9=8B=E5=89=8D=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E6=94=B9=E5=88=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=9C=AC=E8=BA=AB?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E4=BD=93=EF=BC=8C=E8=A1=A5=E4=B8=8A=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/utils/DesignUtils.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/utils/DesignUtils.java b/designer_base/src/com/fr/design/utils/DesignUtils.java index 8ed8aa617..d6a2ab8a5 100644 --- a/designer_base/src/com/fr/design/utils/DesignUtils.java +++ b/designer_base/src/com/fr/design/utils/DesignUtils.java @@ -230,12 +230,15 @@ public class DesignUtils { private static FRFont getCurrentLocaleFont(){ FRFont guiFRFont; - Locale defaultLocale = Locale.getDefault(); + Locale defaultLocale = FRContext.getLocale(); if (isDisplaySimSun(defaultLocale)) { guiFRFont = getNamedFont("SimSun"); } else if(isDisplayDialog(defaultLocale)) { guiFRFont = getNamedFont("Dialog"); + } else if(isDisplayJapaneseFont(defaultLocale)){ + //日文设计器默认用MS Mincho字体渲染 + guiFRFont = getNamedFont("MS Mincho"); } else { guiFRFont = getNamedFont("Tahoma"); } @@ -267,11 +270,14 @@ public class DesignUtils { private static boolean isDisplaySimSun(Locale defaultLocale){ return ComparatorUtils.equals(defaultLocale, Locale.SIMPLIFIED_CHINESE); } + + private static boolean isDisplayJapaneseFont(Locale defaultLocale){ + return ComparatorUtils.equals(defaultLocale, Locale.JAPANESE) + || ComparatorUtils.equals(defaultLocale, Locale.JAPAN); + } private static boolean isDisplayDialog(Locale defaultLocale){ - return ComparatorUtils.equals(defaultLocale, Locale.TRADITIONAL_CHINESE) - || ComparatorUtils.equals(defaultLocale, Locale.JAPANESE) - || ComparatorUtils.equals(defaultLocale, Locale.JAPAN) + return ComparatorUtils.equals(defaultLocale, Locale.TRADITIONAL_CHINESE) || ComparatorUtils.equals(defaultLocale, Locale.KOREAN) || ComparatorUtils.equals(defaultLocale, Locale.KOREA); }