Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335661

Summary: [Help] The help content always shows bold font in pure Win7 Arabic environment.
Product: [Eclipse Project] Platform Reporter: EricHsu <ericcjhsu>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: cgold, curtis.windatt.public, eclipse.felipe, pattyaustin, pwebster, roncraig007, zhhaohh
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
EclipseHelpContentInWin7Arabic.png
none
TestProgramInWin7Arabic.png
none
Test Program
none
Eclipse Help Content Font Issue In Pure Win7 Arabic none

Description EricHsu CLA 2011-01-28 04:17:05 EST
Build Identifier: M20100909-0800

We have a NLS requirement with eclipse plug-in development, and we uses the bold tag <b></b> to define the bold characters in help content, but the help content always shows bold font in pure Win7 Arabic environment.

In the fontconfig.properties file of JDK, the default font definition in Arabic environment is "David" and "David Bold", and we have create a eclipse test program to get the default font in Win7 Arabic environment, it seems not to be David. It's more like Segoe UI.

Note: It only occur on pure Arabic Win7 environment, It looks working fine when use "-nl ar" parameter to launch Eclipse in English Win7 environment.

Reproducible: Always

Steps to Reproduce:
1.Create Eclipse plug-in application in pure Arabic Win7 environment, use help content ability with the Arabic characters.
2.Use bold tag <b></b> to define some words to apply bold attribute.
3.Run Eclipse plug-in application, then press F1 to open the help content in runtime.
Comment 1 EricHsu CLA 2011-01-28 04:19:44 EST
Created attachment 187813 [details]
EclipseHelpContentInWin7Arabic.png
Comment 2 EricHsu CLA 2011-01-28 04:20:24 EST
Created attachment 187814 [details]
TestProgramInWin7Arabic.png
Comment 3 EricHsu CLA 2011-01-28 04:21:30 EST
Created attachment 187815 [details]
Test Program
Comment 4 Curtis Windatt CLA 2011-01-28 11:23:11 EST
Moving to platform help.  This isn't a plug-in development issue.  The help page is not using the bold tags.
Comment 5 Chris Goldthorpe CLA 2011-01-28 12:47:01 EST
I have a couple of questions:

First can you attach a screenshot which shows the help view in Eclipse with bold characters where they should not be.

Second do you see the problem for all contexts or just those which contain a bold tag?
Comment 6 EricHsu CLA 2011-01-30 22:18:58 EST
Created attachment 187925 [details]
Eclipse Help Content Font Issue In Pure Win7 Arabic
Comment 7 EricHsu CLA 2011-01-30 22:29:40 EST
Hi Chris,

Thanks for your investigation,

For the question 1, Please refer my latest attached screenshot (EclipseHelpContentFontIssueInPureWin7Arabic.png), you can see the difference.

For the question 2, We use bold tags for some terms in help contents, but cannot determine any difference in pure Win7 Arabic environment.

Thanks!!
Comment 8 Chris Goldthorpe CLA 2011-01-31 12:36:28 EST
I think that the difference is most likely due to the set of fonts which are installed on the system and which one is chosen by default. It appears that in the Win7 arabic case UI forms is using a font which does not have a bold variant and requesting a bold version of that font returns the original font. 

Looking at your screen shots the Pure Arabic Win 7 font looks very similar to the non bold parts of the English Win 7 with -nl ar so I'm not so sure that the text is bold in Pure Arabic Win 7. It is certainly the case that there is no difference in appearance between the parts that are supposed to be bold and those which are not.
Comment 9 EricHsu CLA 2011-02-24 02:35:36 EST
Hi Chris,

According to your comments, It seems a system default font issue in Arabic Win7 environment.

I have few questions for this:

1. For Eclipse SWT components, the default font priority is based on JDK fontconfig.properties or JFace jfacefonts.properties?

2. Is this work as design in Arabic Win7 support currently?

Thanks for your comments!!
Comment 10 Ron Craig CLA 2011-02-24 15:24:22 EST
Please note we have the exact same issue with Traditional Chinese as well. There is no difference between bold and regular characters.
Comment 11 Chris Goldthorpe CLA 2011-02-24 16:17:28 EST
The help view uses the FormText widget from the UI Forms component and UI Forms requests a bold variant of a font from SWT. Fonts usually come in Font families so each font can come in different sizes and with bold and italic variants, one possibility is that the Font family being used is missing a bold variant. I can't say that this is working as designed.

Vivian, do you have access to a Windows 7 machine? If so can you see whether you see this issue in Traditional Chinese.
Comment 12 EricHsu CLA 2011-03-29 06:06:44 EDT
Hi Chris,

Any update for this? Thank you.
Comment 13 Chris Goldthorpe CLA 2011-03-29 13:27:34 EDT
No, I haven't been looking into this bug recently.
Comment 14 pattyaustin CLA 2011-04-14 22:15:53 EDT
Hi Chris,

  Is there any update regarding to this problem and may I ask if there's any target date or build for this fix?

Thank you,
Amanda
Comment 15 Chris Goldthorpe CLA 2011-04-15 15:01:06 EDT
I have some questions about the screen shots. In the top line of TestProgramInWin7Arabic.png do all 4 strings have the same font weight? Does the test program illustrate the bug or is the problem seen only with context help?
Comment 16 Chris Goldthorpe CLA 2011-04-15 17:29:07 EDT
Assigning to SWT team for comment. As I understand the root cause of the problem is that the default font selected on the Pure Arabic Win 7 system does not have a bold variant. There are other fonts available, including David which have bold variants. How is the default Eclipse font determined and is there a preference to override it?
Comment 17 pattyaustin CLA 2011-04-18 03:27:58 EDT
(In reply to comment #15)
> I have some questions about the screen shots. In the top line of
> TestProgramInWin7Arabic.png do all 4 strings have the same font weight? Does
> the test program illustrate the bug or is the problem seen only with context
> help?


The following code is the one for generating the top line of TestProgramInWin7Arabic.png. And we set BOLD for the middle string.
label1 = new Label(this, SWT.NONE);
label1.setText("متاح فقط اذا تم تحديد مربع الاختيار ");
label2 = new Label(this, SWT.BOLD);
label2.setText("الملء من مجموعة الحروف");
label3 = new Label(this, SWT.NONE);
label3.setText(". حدد مجموعة حروف بنود الكشف المراد استخدامها لملء الكشف.");

And the test program illustrates the bug that the bold font can't be shown as describing here. 

Thank you
Comment 18 Felipe Heidrich CLA 2011-04-18 10:34:03 EDT
(In reply to comment #17)
> label2 = new Label(this, SWT.BOLD);
this line not valid.

Is the problem that you don't get bold arabic text with the default font (Segoe UI) ?
Comment 19 pattyaustin CLA 2011-04-18 11:34:28 EDT
(In reply to comment #18)
> (In reply to comment #17)
> > label2 = new Label(this, SWT.BOLD);
> this line not valid.
> 
> Is the problem that you don't get bold arabic text with the default font (Segoe
> UI) ?

Yes. The problem is we can't see the bold face with the default font which is Segoe UI even if we set it as BOLD.
Comment 20 Felipe Heidrich CLA 2011-04-18 12:46:20 EDT
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > label2 = new Label(this, SWT.BOLD);
> > this line not valid.
> > 
> > Is the problem that you don't get bold arabic text with the default font (Segoe
> > UI) ?
> Yes. The problem is we can't see the bold face with the default font which is
> Segoe UI even if we set it as BOLD.

Not that new Label(this, SWT.BOLD); is not a valid way to set bold font.

Anyhow, the problem is in the font. It is hard to see the difference between bold and regular glyphs for Arabic text in this font. Try on Notepad.

Nothing I can do here, you need to choose a font that has better Arabic support for you. Sorry.