Closed Bug 330715 Opened 18 years ago Closed 18 years ago

Cairo incorrectly substitutes fonts and then bolds them incorrectly (incorrect fonts on Burning Edge bug lists)

Categories

(Core :: Graphics, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dopefishjustin, Assigned: pavlov)

References

()

Details

(Whiteboard: cairo)

Attachments

(8 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060316 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060316 Firefox/1.6a1

This became apparent looking at the Burning Edge bug lists - see bug 324706 comment 24. I did some digging, and I think I've figured out what's going on (I'll attach a testcase to make it clear).

* The CSS for Burning Edge specifies the font Lucida Grande, which comes with OSX but not Windows XP
* In a non-Cairo build on Windows XP, text specified as Lucida Grande renders as plain text, as you would expect
* In a Cairo build, text specified as Lucida Grande renders as Lucida Sans Unicode (which does come with Windows XP). This suggests the Cairo font chooser is being too generous in what it considers to be a font match (although in this case it's not too bad since the two fonts look similar).
* However, when such text is surrounded by <strong> or given a style of font-weight: bolder, instead of choosing the bold weight of the font to render, Cairo chooses some random other font (Marlett in the screenshot posted in 324706, Code2000 on my system).
* Interestingly, with text with font-weight: bold, Cairo seems to find the bold weight of the font without difficulty. (This distinction between bold and bolder reminds me of bug 324611.)
* If the font is specified as Lucida Sans Unicode, everything works properly.

Reproducible: Always

Steps to Reproduce:
1. Look at the testcase which I'm going to attach

Actual Results:  
Two lines of the top list display with an incorrect font.

Expected Results:  
Either display the two lists identically, or (better I think), behave the same as non-Cairo and show the top list as plain text rather than using Lucida Sans Unicode.
Whiteboard: cairo
Attached file Testcase
Attached image win2k screenshot
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060316 Firefox/1.6a1 ID:2006031610 [cairo]

WFM on win2k
Attached image What I see using Cairo build (WIN) (obsolete) —
This is what I see when I access Burning Edge using a Cairo build.
(In reply to comment #5)
> Created an attachment (id=215368) [edit]
> What I see using Cairo build (WIN)
> 
> This is what I see when I access Burning Edge using a Cairo build.
> 

could you please post a buildit or a user agent string?   I cannot reporduce this with a en-US win32 build from 3/17.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060317 Firefox/1.6a1

With these font issues it appears it is also necessary to note what Moazilla localization and what the system locale is set to.
(In reply to comment #6)
> could you please post a buildit or a user agent string?   I cannot reporduce
                          ^^^^^^^

sigh...  That was supposed to say buildid.
For what it's worth, I'm using the en-US localization but my system locale is set to Japanese, and I have East Asian and complex script support installed. I have ClearType turned on but turning that off didn't make the problem go away.
there seem to be a set of issues related to non-en-US windows installs.  I'm getting a Japanese XP install set up on Monday so I can hopefully track down some of these issues.
I am using en-US. 
I am using Windows XP with SP2 (post SP2 patches all installed)
Default language (En-US)
Windows Language for Non-unicode program is set to Chinese (PRC)
All Asian language that is available from Windows XP is installed.
I have been getting this bug on every build of Cairo I used. or you can say since Cairo was turned on, on the trunk.
Flags: blocking1.9a1+
I have this problem with the en-US trunk version on a WinXP machine with generic US system locale.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060323 Firefox/1.6a1 ID:2006032310
It's worse on ZDNET UK.  You can't even read the articles!

http://news.zdnet.co.uk/hardware/0,39020351,39259273,00.htm
Spend more than five seconds reading the bug description. That's a different issue, bug 324706.
(In reply to comment #13)
> Spend more than five seconds reading the bug description. That's a different
> issue, bug 324706.
> 
Actually, I don't believe it is.  Nevertheless, some other checkin has fixed the issue in today's build.  But thanks, anyway.

(In reply to comment #14)
> Nevertheless, some other checkin has fixed the issue in today's build.

I think you're testing the wrong builds.  Nothing has gone in to fix this.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060329 Firefox/1.6a1

Still have the bug.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060406 Firefox/3.0a1

Bug still there.
I am not the only person experiencing this bug.  It is a real show stopper for me since I can't read most Firefox screens. any of my yahoo mal, some hot mail. and Chatzilla.  Would somebody please fix it before I am forced to switch back to IE?

Could someone send me an idiotproof styleseet thatworks?  I ot Am Not A Programmer!!!
If you can't handle broken trunk builds, stick with branch builds or stable releases (why bring up IE?).
Depends on: 334512
Blocks: 334512
No longer depends on: 334512
Blocks: 334728
No longer blocks: 334512
Attached file Testcase
I'd like to demonstrate one testcase, that shows where problem occurs.
Firefox handles fonts lists in such way that if it can't find FIRST font in list, it renders output incorrectly.

Expected result (passed on FF 1.5.0.2, IE6, Opera 8):
line of bold text
line of normal text
(both in Times New Roman font)

Result using Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9a1) Gecko/20060422 Minefield/3.0a1:
some weird font - unreadable
line of normal text in Arial font

My theory is that it can't handle list of fonts and when it can't find proper font, uses bad default.
*** Bug 336738 has been marked as a duplicate of this bug. ***
*** Bug 332862 has been marked as a duplicate of this bug. ***
Depends on: 340590
fixed as part of 340590
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Using latest nightly, I think bug #340590 was checked in. 

http://www.squarefree.com/burningedge/
still have those weird symbol fonts

http://kaizoku-fansubs.com/
this website too....(scroll down) & it's forum


Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060610 Minefield/3.0a1

I downloaded firefox from here -> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2006-06-10-05-trunk/

is this correct?
Same problem! on latest nightly build!!
Attachment #215368 - Attachment is obsolete: true
Yeah, this is still happening. Note that the testcase and links won't show any problem if you have the font Lucida Grande installed, so uninstall that before testing if you have it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 219428 [details]
Testcase

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
    <title>test</title>
</head>
<body>
    <div style="font-family:weird font, Times New Roman">
        <b>bold text</b><br /> <!-- bold text is bad if I haven't got first font in list -->
        normal text <!-- however I can read normal text, but it hasn't got style applied -->
    </div>
</body>
</html>
(In reply to comment #26)
> Yeah, this is still happening. Note that the testcase and links won't show any
> problem if you have the font Lucida Grande installed, so uninstall that before
> testing if you have it.
> 

Don't have Lucida Grande at all. :)
I don't have that font installed and I can't reproduce this on any of my Windows machines.
Attached file Testcase
Another testcase. I tried latest Firefox trunk (clean installation) with new profile and problem is still there :(

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060610 Minefield/3.0a1

Example: http://www.cdr.cz, http://aktualne.centrum.cz/ ... etc.
(In reply to comment #30)
> Created an attachment (id=225174) [edit]
> Testcase
> 
> Another testcase. I tried latest Firefox trunk (clean installation) with new
> profile and problem is still there :(
> 
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060610
> Minefield/3.0a1
> 
> Example: http://www.cdr.cz, http://aktualne.centrum.cz/ ... etc.
> 

testcase + both sites WFM
You don't have CSS hacks for content in userContent.css , right (just to make sure)?

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060610 Minefield/3.0a1 ID:2006061013 [cairo]
(In reply to comment #30)
> Created an attachment (id=225174) [edit]
> Testcase
> 
> Another testcase. I tried latest Firefox trunk (clean installation) with new
> profile and problem is still there :(
> 
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060610
> Minefield/3.0a1
> 
> Example: http://www.cdr.cz, http://aktualne.centrum.cz/ ... etc.
> 

can you tell me if you have set anything special in Windows XP language and regional settings? 
I suspect it has something to do with it...because I have all Asian fonts installed. My windows is En-US.
(In reply to comment #31)
> testcase + both sites WFM
> You don't have CSS hacks for content in userContent.css , right (just to make
> sure)?

No CSS hacks.


(In reply to comment #32)
> can you tell me if you have set anything special in Windows XP language and
> regional settings? 

Windows XP SP2 ENG
Region setting: Czech

I figure that this might be a problem only for people not using the default regional language settings, which is EN-US.
My settings is that use PRC Chinese for non-unicode programs....(this can be set in the Regional and Language settings in Control Panel.

Can anyone here test this theory out?
(In reply to comment #34)
> I figure that this might be a problem only for people not using the default
> regional language settings, which is EN-US.

yes, switched  (language for non-unicode programs) from czech to en-us and the problem disappeared.
then this bug needs to be re-file! Because the the way it works is now different.
Attached patch fix(?)Splinter Review
So it looks like for whatever reason you're hitting fallback font code for that text and you're ending up with webdings selected (hoo dog!).  This will avoid webdings and wingdings and any other non-unicode font from ever being selected.

verbal r+ from mrbkap
Assignee: nobody → pavlov
Status: REOPENED → ASSIGNED
Attachment #226708 - Flags: review+
think it is fixed for reals now.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Depends on: 342466
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060622 Minefield/3.0a1
hourly build.

I tried 3. Still same problem. I have already refile this bug here -> https://bugzilla.mozilla.org/show_bug.cgi?id=342143

because the condition of it happening has changed.
You need to log in before you can comment on or make changes to this bug.