Community
Participate
Working Groups
Build Identifier: Numeric contextual behavior requires the digits following Latin text to be represented in Arabic-Western digits while those following Arabic text to be represented in Arabic-Indic representation. Digits representation in IES has to reflect user preferences for Digit substitution. Also, this support needs to be consistent across all IES projects. This bug will be a place holder for Digits shaping bugs. Reproducible: Always
Dina, shouldn't the version be '3.7'?
Created attachment 191962 [details] Proposed patch to fix contextual numeral shaping Fix the following bugs https://bugs.eclipse.org/bugs/show_bug.cgi?id=135242 https://bugs.eclipse.org/bugs/show_bug.cgi?id=274567 https://bugs.eclipse.org/bugs/show_bug.cgi?id=307328
is the intent of this problem report to track the changes needed in SWT to implement the requested feature ? Please, clean the patch: - it includes changes for othr projects (draw2d etc) - it includes the changes I released for surrogates last week - it has a funny method in Resource: public int getSystemDigitSubistitution(){ int digitSub=-1; return digitSub; } it has one method that seems to do something in TextLayout: /* * Returns the following * 0 when Contextual Digit Substitution is selected * 1 when None Digit Substitution is selected * 2 when National Digit Substitution is selected */ public int getSystemDigitSubistitution(){ SCRIPT_DIGITSUBSTITUTE scriptDigitSubistitue= new SCRIPT_DIGITSUBSTITUTE(); OS.ScriptRecordDigitSubstitution(OS.LOCALE_USER_DEFAULT,scriptDigitSubistitue); return scriptDigitSubistitue.DigitSubstitute; } (I suppose this is the only method you really need...) - no need to add your name to the copyright (you work for IBM)
(In reply to comment #3) > it has one method that seems to do something in TextLayout: > /* > * Returns the following > * 0 when Contextual Digit Substitution is selected > * 1 when None Digit Substitution is selected > * 2 when National Digit Substitution is selected > */ > public int getSystemDigitSubistitution(){ Is this a Windows only concept ? What about Mac and Linux, did you search for similar support on Mac and Linux ? What is default behaviour for Mac and Linux for digit substitution (in another word, what is the correct value that getSystemDigitSubistitution() should return on mac and linux?) --- All our getSystemSomething() are in Display, I believe that Display is the right place to add this new getSystemDigitSubistitution() method. --- Returing magic numbers in the API is usualy a bad practice, we sould add constants IMO. --- In Uniscribe (win32), I saw 4 possible return values: SCRIPT_DIGITSUBSTITUTE_CONTEXT SCRIPT_DIGITSUBSTITUTE_NATIONAL SCRIPT_DIGITSUBSTITUTE_NONE SCRIPT_DIGITSUBSTITUTE_TRADITIONAL Your JavaDoc only describes three, why is that ?
(In reply to comment #3) > is the intent of this problem report to track the changes needed in SWT to > implement the requested feature ? > Yes > Please, clean the patch: > - it includes changes for othr projects (draw2d etc) Part of the fix is in draw2d, I removed this part and added it in a separate patch in bug # 274567 > - it includes the changes I released for surrogates last week You mean changed in TextLayout.java? if yes I made synchronize with repository before creating the patch ,any step am missing ? > - it has a funny method in Resource: The reason of adding this method is to avoid adding getSystemDigitSubistitution in each TextLayout.java for each platform,so adding them once in the parent. As only am interested in detecting contextual behavior I changed the method to public boolean isContextDigitSubistitution() please advise if it should be placed somewhere else and how to propagate it in other platforms > > public int getSystemDigitSubistitution(){ > int digitSub=-1; > return digitSub; > } > > it has one method that seems to do something in TextLayout: > /* > * Returns the following > * 0 when Contextual Digit Substitution is selected > * 1 when None Digit Substitution is selected > * 2 when National Digit Substitution is selected > */ > public int getSystemDigitSubistitution(){ > > SCRIPT_DIGITSUBSTITUTE scriptDigitSubistitue= new SCRIPT_DIGITSUBSTITUTE(); > > OS.ScriptRecordDigitSubstitution(OS.LOCALE_USER_DEFAULT,scriptDigitSubistitue); > return scriptDigitSubistitue.DigitSubstitute; > } > > (I suppose this is the only method you really need...) > > - no need to add your name to the copyright (you work for IBM)
Created attachment 192296 [details] Proposed patch
shouldn't your patch only include this one method: /* * if the digit substitution selected is contextual return true, otherwise return false */ public boolean isContextDigitSubistitution(){ SCRIPT_DIGITSUBSTITUTE scriptDigitSubistitue= new SCRIPT_DIGITSUBSTITUTE(); OS.ScriptRecordDigitSubstitution(OS.LOCALE_USER_DEFAULT,scriptDigitSubistitue); if(scriptDigitSubistitue.DigitSubstitute==0) return true; return false; } ? why did you change it from int to boolean ? What is the answer for Linux and Mac (see comment 4). The patch still have several changes to TextLayout to should not be there (the surrogate stuff).
Hi Dina, this is just a reminder that feature freeze is next week. We need all new API in before that.
(In reply to comment #8) > Hi Dina, this is just a reminder that feature freeze is next week. We need all > new API in before that. ...and you need API approval from the PMC for any API changes, including additions.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.