Closed Bug 293511 Opened 20 years ago Closed 10 years ago

Use appropriate script fonts for Danda and Double Danda

Categories

(Core Graveyard :: GFX: Win32, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sukhuk, Assigned: jshin1987)

References

()

Details

Attachments

(7 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Although Danda (U+0964, ।) and Double Danda (U+0965, ॥) are contained within the Devanagari block, they are used by many Indic scripts. Unfortunately, this appears to pose problems when selecting the right font to use. With my testing on Gurmukhi, it appears that a standard Gurmukhi font is used for all Gurmukhi text, but not for the Danda and Double Danda. This causes the Danda and Double Danda to look strange. Reproducible: Always Steps to Reproduce:
Attached image How Firefox Renders (deleted) —
Attached image How Internet Explorer Renders (deleted) —
The site used for this test was http://guca.sourceforge.net/pa/faq/ I can't be 100% certain that the font used is incorrect (I have no way of testing it), but it certainly doesn't look right.
Assignee: nobody → smontagu
Component: Layout: Fonts and Text → Internationalization
QA Contact: layout.fonts-and-text → amyy
taking.
Assignee: smontagu → jshin1987
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Internationalization → GFX: Win32
For those who don't know either Devanagari or Gurmukhi, it's tough to compare two screenshots and find out what's wrong. Of course, I can search for U+0965 and U+0964 in the html source, but it takes time. You could have made my job easier by making a minimal test case in html and upload it here. If not, at least you can mark where firefox's rendering is problematic in the screenshot. Anyway, I'll make a test case tomorrow and try to see what we don't do right.
Status: NEW → ASSIGNED
(In reply to comment #5) > For those who don't know either Devanagari or Gurmukhi, it's tough to compare > two screenshots and find out what's wrong. Of course, I can search for U+0965 > and U+0964 in the html source, but it takes time. You could have made my job > easier by making a minimal test case in html and upload it here. If not, at > least you can mark where firefox's rendering is problematic in the screenshot. > Anyway, I'll make a test case tomorrow and try to see what we don't do right. Sorry :D I'll prepare a quick test case for you. This applies to other Indic scripts also (although I don't know much about them so maybe I'm not the best person to speak to in that respect). There is talk about disunifying Dandas in Unicode due to this exact problem, but that's certainly not final and even if it is accepted it will be years before the effects trickle down. In the meantime, the Danda's are the "|" like characters.
Attached file Test case (deleted) —
Test case. The default language for the file is 'pa'. The devanagari bits have the tag xml:lang="hi".
Attached image Firefox Test Case (deleted) —
This is how Firefox renders the test case. It appears that the only time the Dandas look correct is when the font for Devanagari is specifically selected. Even when the font for Gurmukhi is selected, it still doesn't look right.
Attached image Internet Explorer Test Case (deleted) —
Internet Explorer appears to render all cases correctly. Although I can't be 100% sure because there isn't much difference in the fonts!
I think this may be dependent on another bug. If I change the testcase to use lang instead of xml:lang I get much better results, at least as far as I can tell. It certainly looks more consistent.
(In reply to comment #10) > Created an attachment (id=183113) [edit] > Testcase with lang instead of xml:lang > I think this may be dependent on another bug. Yup, that's bug 234685 and I was about to make that replacement, too :-) (In reply to comment #6) Thanks for the test case. > In the meantime, the Danda's are the "|" like characters. Gee, I knew that, but it's rather hard to find Danda and double Danda in the sea of characters 'foreign' to me.
(In reply to comment #12) > Yup, that's bug 234685 and I was about to make that replacement, too :-) Sorry for bug spam. It's bug 234485.
Depends on: 234485
(In reply to comment #10) > Created an attachment (id=183113) [edit] > Testcase with lang instead of xml:lang > > I think this may be dependent on another bug. If I change the testcase to use > lang instead of xml:lang I get much better results, at least as far as I can > tell. It certainly looks more consistent. I appear to get exactly the same results for both test cases. Can you post a screenshot of what you're seeing?
Erm, sorry, didn't see that last attachment! Yes it seems to be working for Devanagari, but not for Gurmukhi. Would the patch be based on the language tag (pa, pa-IN) or would it be based on analysing the text around the Danda to see what to do?
(In reply to comment #15) > Yes it seems to be working for Devanagari, but not for Gurmukhi. Hmm. Danda and double danda in the first line look identical to those in the third line as far as I can tell. What's wrong with that? > Would the > patch be based on the language tag (pa, pa-IN) or would it be based on analysing > the text around the Danda to see what to do? If lang is specified, it's used. Otherwise, we fall back to the code-range-based font selection.
(In reply to comment #16) > (In reply to comment #15) > > > Yes it seems to be working for Devanagari, but not for Gurmukhi. > > Hmm. Danda and double danda in the first line look identical to those in the > third line as far as I can tell. What's wrong with that? Yes they look identical because they both use the same font - but they're not using the same font as the main Gurmukhi character (which is the problem). I can't be 100% certain that this is the case because I have no way of individually testing what font is being used to show the Dandas, but they are out of place and are not of the same proportion as the main Gurmukhi text. If you check out the IE screen shot for the test case you will see how the proportions for the Dandas match the main body text for all cases. In the final screenshot (Attachment 183113 [details] in trunk Mozilla) you see how now both the Devanagari Dandas seem to look fine, but when using them with Gurmukhi they don't. The only reason I can think of why it's doing what it is doing is because it uses another font - probably a standard Devanagari one and not the assigned Gurmukhi font - for the Dandas because they're in the Devanagari block. I hope you understand what I'm trying to say.
Sorry it's actually Attachment 183114 [details] that you need to look at for the final screenshot. I'm still getting used to Bugzilla :D
(In reply to comment #17) > Yes they look identical because they both use the same font - but they're not > using the same font as the main Gurmukhi character (which is the problem). I > can't be 100% certain that this is the case because I have no way of > individually testing what font is being used to show the Dandas, but they are > out of place and are not of the same proportion as the main Gurmukhi text. I've looked at this with a debugger and it seems to be a bug in Windows, or maybe a limitation of the APIs we currently use. The whole string is being rendered in a single call to ExtTextOutW. To get better results we probably need to call Uniscribe directly and specify a default language.
Depends on: uniscribe
(In reply to comment #6) > There is talk about disunifying Dandas in > Unicode due to this exact problem, but that's certainly not final and even if it > is accepted it will be years before the effects trickle down. It has been rejected. See http://www.unicode.org/review/resolved-pri.html "Closed 2005-05-18. The UTC has not seen pervasive problems caused by the unification of dandas in the core scripts of India. Therefore based on concerns for stability, the UTC re-affirms its position that dandas are unified across these scripts."
I see - that means that this will need to be addressed in a different way - i.e. calling Uniscribe directly as you described.
with uniscribe on the trunk with cairo builds, the tests seem to work properly although the danda and double danda in the Devanagari, xml:lang="hi" case don't seem to measure properly.
Product: Core → Core Graveyard
This bug has been buried in the graveyard and has not been updated in over 5 years. It is probably safe to assume that it will never be fixed, so resolving as WONTFIX. [Mass-change filter: graveyard-wontfix-2014-09-24]
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: