Author: jleroux
Date: Sat Oct 17 13:54:48 2009
New Revision: 826253
URL:
http://svn.apache.org/viewvc?rev=826253&view=revLog:
Fix an issue with Chinese font in POS
AWT bug reported at
http://n4.nabble.com/Simplified-Chinese-characters-are-displayed-as-square-boxes-in-POS-td165505.html#a165506More to come as this fix only the operator's part of the screen
Modified:
ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java?rev=826253&r1=826252&r2=826253&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java Sat Oct 17 13:54:48 2009
@@ -83,7 +83,12 @@
String fontName = titleStyle.getStyleAsString(XStyle.FONT_FACE);
int fontStyle = titleStyle.getStyleAsInt(XStyle.FONT_WEIGHT);
int fontSize = titleStyle.getStyleAsInt(XStyle.FONT_SIZE);
- Font titleFont = new Font(fontName, fontStyle, fontSize);
+ Font titleFont = null;
+ if (defaultLocale.getLanguage().equals("zh")) { // AWT bug reported at
http://n4.nabble.com/Simplified-Chinese-characters-are-displayed-as-square-boxes-in-POS-td165505.html#a165506+ titleFont = new Font(null, fontStyle, fontSize);
+ } else {
+ titleFont = new Font(fontName, fontStyle, fontSize);
+ }
Border base = BorderFactory.createEtchedBorder();
TitledBorder border = BorderFactory.createTitledBorder(base, this.getFieldTitle(field.getName()),