From 8487130f901a86fadb35a86e903372249776e18d Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 14 Oct 2016 16:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E6=97=A5?= =?UTF-8?q?=E6=96=87=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=AD=97=E4=BD=93=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E6=98=8E=E6=9C=9D=E5=AD=97=E4=BD=93=E4=BA=86=EF=BC=8C?= =?UTF-8?q?=E4=BB=8D=E6=97=A7=E7=94=A8=E5=9B=9E=E4=BB=A5=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E5=AE=8B=E4=BD=93?= 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, 4 insertions(+), 10 deletions(-) diff --git a/designer_base/src/com/fr/design/utils/DesignUtils.java b/designer_base/src/com/fr/design/utils/DesignUtils.java index d6a2ab8a58..8ed8aa6175 100644 --- a/designer_base/src/com/fr/design/utils/DesignUtils.java +++ b/designer_base/src/com/fr/design/utils/DesignUtils.java @@ -230,15 +230,12 @@ public class DesignUtils { private static FRFont getCurrentLocaleFont(){ FRFont guiFRFont; - Locale defaultLocale = FRContext.getLocale(); + Locale defaultLocale = Locale.getDefault(); 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"); } @@ -270,14 +267,11 @@ 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) + return ComparatorUtils.equals(defaultLocale, Locale.TRADITIONAL_CHINESE) + || ComparatorUtils.equals(defaultLocale, Locale.JAPANESE) + || ComparatorUtils.equals(defaultLocale, Locale.JAPAN) || ComparatorUtils.equals(defaultLocale, Locale.KOREAN) || ComparatorUtils.equals(defaultLocale, Locale.KOREA); }