Closed Bug 364678 Opened 18 years ago Closed 18 years ago

Incorrectly styled text after bug 362665 (only on western page??)

Categories

(Core :: Graphics, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: phiw2, Assigned: masayuki)

References

Details

Attachments

(7 files, 7 obsolete files)

(deleted), text/html; charset=ISO-8859-1
Details
(deleted), image/png
Details
(deleted), image/jpeg
Details
(deleted), text/plain
Details
(deleted), text/plain
Details
(deleted), image/png
Details
(deleted), patch
masayuki
: review+
Details | Diff | Splinter Review
All text in webpages and chrome of Minefield is displayed using 'Helvetica'.
Styling of text on Webpages using CSS: font-family: XXX (where XXX is the font name) is not applied.

Behaviour changed between the 2006122119 build and the 2006122120
works OK
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a2pre) Gecko/20061221 Minefield/3.0a2pre ID:2006122119 [cairo]
Fails
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a2pre) Gecko/20061221 Minefield/3.0a2pre ID:2006122120 [cairo]

--> bug 362665
Attached file basic test case for font-styling (deleted) —
Each paragraph should be styled as specified.
All of them are styled with 'Helvetica' except one: 'georgia'
Attached image screenshot of testcase (deleted) —
Side by Side
Minefield (build 2006122120) on the left.
Camino trunk build (build 2006122117 (1.2+)) on the right. 

That Camino build predates the Landing of the patch in bug 362665 by a few hours
Summary: Incorrectly styled text after bug → Incorrectly styled text after bug 362665
Attached image Screenshot of Chrome part (deleted) —
Note the incorrect alignment of text on the bookmark bar
On my environment, I cannot reproduce this bug.
Please wait.
Assignee: nobody → masayuki
Blocks: 362665
Attached patch logging patch (obsolete) (deleted) — Splinter Review
Would you attach the log by this patch?
Attached patch logging patch (obsolete) (deleted) — Splinter Review
Oops, sorry. I attached the wrong file.
Attachment #249412 - Attachment is obsolete: true
Wow, I can reproduce with changing the page charset to western in the testcase.
Attachment #249406 - Attachment mime type: text/html → text/html; charset=ISO-8859-1
Summary: Incorrectly styled text after bug 362665 → Incorrectly styled text after bug 362665 (only on western page??)
I think that the resolver works fine.
The cause may be font switching by ATSUI on gfxAtsuiFont.cpp
The previous comment is wrong. I find a easy mistake.
Status: NEW → ASSIGNED
Attached patch Patch rv1.0 (obsolete) (deleted) — Splinter Review
I forgot to cache the postscript name that is using for finding the atsui font id in |FindFromSystem|.
But I don't know why it works fine with non-western encodings...

# I need to leave my desk. After this review, please check-in this patch if anybody can do it.
Attachment #249413 - Attachment is obsolete: true
Attachment #249419 - Flags: review?(vladimir)
Attached file log per comment 6 (deleted) —
I'm a bit late/slow... :-)
Requested log. As you guessed, can't find those fonts

(In reply to comment #10)
>
Glad you found it. I'll try this as soon as possible
(In reply to comment #11)
> Created an attachment (id=249421) [edit]
> log per comment 6
> 
> I'm a bit late/slow... :-)
> Requested log. As you guessed, can't find those fonts

Wow, your list doesn't contain the 'Times' and 'Lucida Grande'. Did you uninstall the fonts??
Or, your these fonts don't have the postscript name.
I cannot find the fonts they are not having the postscript name, I may need to care the fonts.(This bug cannot be fixed by the patch.)
(In reply to comment #12)
> (In reply to comment #11)
> > Created an attachment (id=249421) [edit]

> 
> Wow, your list doesn't contain the 'Times' and 'Lucida Grande'. Did you
> uninstall the fonts??
> 
No, all fonts are there in their default location.

(10.4.8 PPC)

I loaded an other page from my development server. That page uses most of the roman fonts available on OS X/10.4. The log shows that Minefield can't find any of them.
(In reply to comment #13)
> Or, your these fonts don't have the postscript name.
> I cannot find the fonts they are not having the postscript name, I may need to
> care the fonts.(This bug cannot be fixed by the patch.)
> 

According to FontBook.app, the postscript name for Lucida Grande is 'LucidaGrande', the bold face is 'LucidaGrande-Bold'.
Times is 'Times-Roman'

I had a script somewhere to output a list of all fonts. I'll try to find it back.

(In reply to comment #15)

> I had a script somewhere to output a list of all fonts. I'll try to find it
> back.
> 

Found it, Font Tools, form Apple
http://developer.apple.com/textfonts/download/

I'll attach the list next.

Attached file list of fonts (deleted) —
Result of ftxinstalledfonts -fpq > ~/Desktop/installedfontsPSQD.txt
Comment on attachment 249419 [details] [diff] [review]
Patch rv1.0

we need to care the non-postscript font(?).
Attachment #249419 - Flags: review?(vladimir) → review-
Attached patch Patch rv1.1 (obsolete) (deleted) — Splinter Review
philippe:

Would you test this patch? And would you attach the log?
Attachment #249419 - Attachment is obsolete: true
Attached patch Patch rv2.0 (obsolete) (deleted) — Splinter Review
I understand what happens. Because I changed the system locale to English, I can reproduce the bug of failing to list up the all fonts.

The converting by CFString doesn't work fine. I don't know the reason. Now, I use TCE for converting. Because old gfx uses this.

And I found another bug. If the (n)th font has font family name that is same as the name of (n+1)th or later fonts, the resolver returns (n)th font for the name. I add the new member mFamilyNames that is linking to postscript name. See for the detail of the members.
Attachment #249448 - Attachment is obsolete: true
Attachment #249457 - Flags: review?(vladimir)
(In reply to comment #20)
> the name of (n+1)th or later fonts, the resolver returns (n)th font for the
> name. I add the new member mFamilyNames that is linking to postscript name. See
> for the detail of the members.

"See the header file for the detail of the members."
     ^^^^^^^^^^^^^^^
Attached patch Patch rv2.0.1 (obsolete) (deleted) — Splinter Review
Oops, there is a unused variable.
Attachment #249457 - Attachment is obsolete: true
Attachment #249458 - Flags: review?(vladimir)
Attachment #249457 - Flags: review?(vladimir)
Comment on attachment 249458 [details] [diff] [review]
Patch rv2.0.1

Looks good again, I think; though once again, I didn't test.  Btw, "localized" in your comments, not "localzed" :)
Attachment #249458 - Flags: review?(vladimir) → review+
Patch rv2.0.1
In a  quick first testing: this works fine. !!
The test case attached here displays correctly. The text in the chrome part of the browser displays correctly (bookmarks bar, Preference window, and more).

Thank you Masayuki-san.

However, some Japanese sites (like http://mozillazine.jp/) still don't display correctly from my end. But I think that is another bug (maybe reopen 357555 for that ?).
Blocks: 364713
Attached image screenshot (deleted) —
from http://mozillazine.jp/
patched Minefield, English OS 10.4.8
I see the same problem in a tab title when it contains Japanese characters
Attached patch Patch rv2.1 (for checking-in) (obsolete) (deleted) — Splinter Review
Thank you.
# I added a new condition for an assertion.
Attachment #249458 - Attachment is obsolete: true
Attachment #249492 - Flags: review+
checked-in, thank you.

philippe:

Thank you for your testing! I will file a bug for the font switching. If you find the font switching bug, please note the URLs. Thanks.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Attached patch Patch rv2.1 (for checking-in) (deleted) — Splinter Review
Oops, I forgot to type a diff command.
Attachment #249492 - Attachment is obsolete: true
Attachment #249493 - Flags: review+
Depends on: 365613
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: