Simplified Chinese characters are displayed as square boxes in POS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Simplified Chinese characters are displayed as square boxes in POS

Terence Ng
Hi,

I am using Windows XP Simplified Chinese Version SP3, Sun JDK5.0 Update 20. I want to run Apache Ofbiz POS; however, the Chinese characters (zh) in PosUiLabels.xml are all displayed as square boxes in POS panel.

I have tested run Ofbiz in Mac OS X and the Simplified Chinese are displayed normally, and other languages can also be displayed in Windows XP.

I think there should be some settings in fontconfig.properties in %JAVA_HOME%\jre\lib that I can work on. But I don't know what is going wrong.

I have copied the font SimSun.ttf to %JAVA_HOME%\jre\lib\fonts.

What should I do?

Regards,
Terence
Reply | Threaded
Open this post in threaded view
|

Re: Simplified Chinese characters are displayed as square boxes in POS

Shi Jinghai
It's a common problem for awt i18n. Set the fontname to null to let jre
choose the default name for you. For example, you can change
        Font titleFont = new Font(fontName, fontStyle, fontSize);
to
        Font titleFont = new Font(null, fontStyle, fontSize);
in specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java.

Rebuild and try again.

Good luck,

Shi Jinghai/Beijing Langhua Ltd.


在 2009-09-27日的 20:53 -0700,ngterry写道:

> Hi,
>
> I am using Windows XP Simplified Chinese Version SP3, Sun JDK5.0 Update 20.
> I want to run Apache Ofbiz POS; however, the Chinese characters (zh) in
> PosUiLabels.xml are all displayed as square boxes in POS panel.
>
> I have tested run Ofbiz in Mac OS X and the Simplified Chinese are displayed
> normally, and other languages can also be displayed in Windows XP.
>
> I think there should be some settings in fontconfig.properties in
> %JAVA_HOME%\jre\lib that I can work on. But I don't know what is going
> wrong.
>
> I have copied the font SimSun.ttf to %JAVA_HOME%\jre\lib\fonts.
>
> What should I do?
>
> Regards,
> Terence

Reply | Threaded
Open this post in threaded view
|

Re: Simplified Chinese characters are displayed as square boxes in POS

Terence Ng
Hi Jinghai,

I have tried it.  It works only on some parts of the screen in POS panel.

How to solve the other parts of the screen?

Thanks in advance!

Regards,
Terence

Shi Jinghai wrote
It's a common problem for awt i18n. Set the fontname to null to let jre
choose the default name for you. For example, you can change
        Font titleFont = new Font(fontName, fontStyle, fontSize);
to
        Font titleFont = new Font(null, fontStyle, fontSize);
in specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java.

Rebuild and try again.

Good luck,

Shi Jinghai/Beijing Langhua Ltd.


在 2009-09-27日的 20:53 -0700,ngterry写道:
> Hi,
>
> I am using Windows XP Simplified Chinese Version SP3, Sun JDK5.0 Update 20.
> I want to run Apache Ofbiz POS; however, the Chinese characters (zh) in
> PosUiLabels.xml are all displayed as square boxes in POS panel.
>
> I have tested run Ofbiz in Mac OS X and the Simplified Chinese are displayed
> normally, and other languages can also be displayed in Windows XP.
>
> I think there should be some settings in fontconfig.properties in
> %JAVA_HOME%\jre\lib that I can work on. But I don't know what is going
> wrong.
>
> I have copied the font SimSun.ttf to %JAVA_HOME%\jre\lib\fonts.
>
> What should I do?
>
> Regards,
> Terence
Reply | Threaded
Open this post in threaded view
|

Re: Simplified Chinese characters are displayed as square boxes in POS

Shi Jinghai
Hi Terence,

I'm sorry I can't help you now as I don't have a POS.

If no Font is used explicitly, you could try something like
setFont or etc.

Good luck,

Shi Jinghai/Beijing Langhua Ltd.


在 2009-10-14三的 22:26 -0700,Terence Ng写道:

> Hi Jinghai,
>
> I have tried it.  It works only on some parts of the screen in POS panel.
>
> How to solve the other parts of the screen?
>
> Thanks in advance!
>
> Regards,
> Terence
>
>
> Shi Jinghai wrote:
> >
> > It's a common problem for awt i18n. Set the fontname to null to let jre
> > choose the default name for you. For example, you can change
> >         Font titleFont = new Font(fontName, fontStyle, fontSize);
> > to
> >         Font titleFont = new Font(null, fontStyle, fontSize);
> > in specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java.
> >
> > Rebuild and try again.
> >
> > Good luck,
> >
> > Shi Jinghai/Beijing Langhua Ltd.
> >
> >
> > 在 2009-09-27日的 20:53 -0700,ngterry写道:
> >> Hi,
> >>
> >> I am using Windows XP Simplified Chinese Version SP3, Sun JDK5.0 Update
> >> 20.
> >> I want to run Apache Ofbiz POS; however, the Chinese characters (zh) in
> >> PosUiLabels.xml are all displayed as square boxes in POS panel.
> >>
> >> I have tested run Ofbiz in Mac OS X and the Simplified Chinese are
> >> displayed
> >> normally, and other languages can also be displayed in Windows XP.
> >>
> >> I think there should be some settings in fontconfig.properties in
> >> %JAVA_HOME%\jre\lib that I can work on. But I don't know what is going
> >> wrong.
> >>
> >> I have copied the font SimSun.ttf to %JAVA_HOME%\jre\lib\fonts.
> >>
> >> What should I do?
> >>
> >> Regards,
> >> Terence
> >
> >
> >
>

Reply | Threaded
Open this post in threaded view
|

Re: Simplified Chinese characters are displayed as square boxes in POS

Jacques Le Roux
Administrator
Hi Shi,

I'm working on it and I have a solution... Currently implementing... Looks like it works ;o)

Thanks for the tip!

Jacques

From: "Shi Jinghai" <[hidden email]>

> Hi Terence,
>
> I'm sorry I can't help you now as I don't have a POS.
>
> If no Font is used explicitly, you could try something like
> setFont or etc.
>
> Good luck,
>
> Shi Jinghai/Beijing Langhua Ltd.
>
>
> 在 2009-10-14三的 22:26 -0700,Terence Ng写道:
>> Hi Jinghai,
>>
>> I have tried it.  It works only on some parts of the screen in POS panel.
>>
>> How to solve the other parts of the screen?
>>
>> Thanks in advance!
>>
>> Regards,
>> Terence
>>
>>
>> Shi Jinghai wrote:
>> >
>> > It's a common problem for awt i18n. Set the fontname to null to let jre
>> > choose the default name for you. For example, you can change
>> >         Font titleFont = new Font(fontName, fontStyle, fontSize);
>> > to
>> >         Font titleFont = new Font(null, fontStyle, fontSize);
>> > in specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java.
>> >
>> > Rebuild and try again.
>> >
>> > Good luck,
>> >
>> > Shi Jinghai/Beijing Langhua Ltd.
>> >
>> >
>> > 在 2009-09-27日的 20:53 -0700,ngterry写道:
>> >> Hi,
>> >>
>> >> I am using Windows XP Simplified Chinese Version SP3, Sun JDK5.0 Update
>> >> 20.
>> >> I want to run Apache Ofbiz POS; however, the Chinese characters (zh) in
>> >> PosUiLabels.xml are all displayed as square boxes in POS panel.
>> >>
>> >> I have tested run Ofbiz in Mac OS X and the Simplified Chinese are
>> >> displayed
>> >> normally, and other languages can also be displayed in Windows XP.
>> >>
>> >> I think there should be some settings in fontconfig.properties in
>> >> %JAVA_HOME%\jre\lib that I can work on. But I don't know what is going
>> >> wrong.
>> >>
>> >> I have copied the font SimSun.ttf to %JAVA_HOME%\jre\lib\fonts.
>> >>
>> >> What should I do?
>> >>
>> >> Regards,
>> >> Terence
>> >
>> >
>> >
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Simplified Chinese characters are displayed as square boxes in POS

Jacques Le Roux
Administrator
Fixed at revision: 826303
Actually we were on the wrong way. It was much more simple than that. It was obvious but was missing in my mind :/

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Hi Shi,
>
> I'm working on it and I have a solution... Currently implementing... Looks like it works ;o)
>
> Thanks for the tip!
>
> Jacques
>
> From: "Shi Jinghai" <[hidden email]>
>> Hi Terence,
>>
>> I'm sorry I can't help you now as I don't have a POS.
>>
>> If no Font is used explicitly, you could try something like
>> setFont or etc.
>>
>> Good luck,
>>
>> Shi Jinghai/Beijing Langhua Ltd.
>>
>>
>> 在 2009-10-14三的 22:26 -0700,Terence Ng写道:
>>> Hi Jinghai,
>>>
>>> I have tried it.  It works only on some parts of the screen in POS panel.
>>>
>>> How to solve the other parts of the screen?
>>>
>>> Thanks in advance!
>>>
>>> Regards,
>>> Terence
>>>
>>>
>>> Shi Jinghai wrote:
>>> >
>>> > It's a common problem for awt i18n. Set the fontname to null to let jre
>>> > choose the default name for you. For example, you can change
>>> >         Font titleFont = new Font(fontName, fontStyle, fontSize);
>>> > to
>>> >         Font titleFont = new Font(null, fontStyle, fontSize);
>>> > in specialpurpose/pos/src/org/ofbiz/pos/component/Operator.java.
>>> >
>>> > Rebuild and try again.
>>> >
>>> > Good luck,
>>> >
>>> > Shi Jinghai/Beijing Langhua Ltd.
>>> >
>>> >
>>> > 在 2009-09-27日的 20:53 -0700,ngterry写道:
>>> >> Hi,
>>> >>
>>> >> I am using Windows XP Simplified Chinese Version SP3, Sun JDK5.0 Update
>>> >> 20.
>>> >> I want to run Apache Ofbiz POS; however, the Chinese characters (zh) in
>>> >> PosUiLabels.xml are all displayed as square boxes in POS panel.
>>> >>
>>> >> I have tested run Ofbiz in Mac OS X and the Simplified Chinese are
>>> >> displayed
>>> >> normally, and other languages can also be displayed in Windows XP.
>>> >>
>>> >> I think there should be some settings in fontconfig.properties in
>>> >> %JAVA_HOME%\jre\lib that I can work on. But I don't know what is going
>>> >> wrong.
>>> >>
>>> >> I have copied the font SimSun.ttf to %JAVA_HOME%\jre\lib\fonts.
>>> >>
>>> >> What should I do?
>>> >>
>>> >> Regards,
>>> >> Terence
>>> >
>>> >
>>> >
>>>
>>
>
>