Closed
Bug 395866
Opened 17 years ago
Closed 17 years ago
font fallback does not respect stylesheet font list
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jtd, Assigned: masayuki)
Details
Attachments
(3 files)
When a style specifies a list of fonts, the first font found is used for elements that use this style. However, if that font does not contain glyphs for a given substring within a text run, the font fallback code immediately starts with fonts defined in user preferences. It should be searching through the list of fonts in the style's font list first before using user or system-specified substitutes. Steps: 1. Check to verify that Japanese fonts are installed (look for Hiragino xxx in Font Book). Install if needed. 2. Open the testcase. Result: the first example of Japanese text renders correctly, the second one does not.
Flags: blocking1.9?
Reporter | ||
Comment 1•17 years ago
|
||
Reporter | ||
Comment 2•17 years ago
|
||
Reporter | ||
Comment 3•17 years ago
|
||
Related bugzilla-jp bug: http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=5858
Assignee | ||
Comment 4•17 years ago
|
||
Thanks, John. I think this is correct. kATSULastResortOnlyFallback doesn't use non-first fonts in fallback font list. I think kATSUSequentialFallbacksExclusive is correct. But it uses non-listed fonts. (It seems that the behavior is different from the ATSUI reference.) Therefore, we need to check whether the substituteFontID is listed in the fontgroup.
Assignee | ||
Comment 5•17 years ago
|
||
er, And I changed FindATSUFont. It adds many fonts which is added already. E.g., when the fonts of font-family property and pref fonts have common fonts.
Reporter | ||
Comment 6•17 years ago
|
||
From my testing today, this appears to fix the problem. It also eliminates the inclusion of the same font multiple times (yay!). I'm still a little concerned about the structure of this code though, the font matching loop in gfxAtsuiFontGroup::InitTextRun is getting a bit unwieldy. Based on discussions with Stuart, I think it makes sense to try and move some of Stuart's font selection code for Windows that scans font cmap's to the Mac and avoid the use of ATSUMatchFontsToText if possible.
Assignee | ||
Comment 7•17 years ago
|
||
er, if the font style is system fonts, should we use kATSUSequentialFallbacksPreferred at first time? (i.e., the second loop is not needed at that time?)
Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #7) > er, if the font style is system fonts, should we use > kATSUSequentialFallbacksPreferred at first time? (i.e., the second loop is not > needed at that time?) oops, if we do so, the CJK text in menus may be broken on non-CJK locales. we need another approach, but it's out of scope of this bug.
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9+
Reporter | ||
Comment 9•17 years ago
|
||
(In reply to comment #8) > oops, if we do so, the CJK text in menus may be broken on non-CJK locales. we > need another approach, but it's out of scope of this bug. So the patch as it stands is fine, font fallback to fonts in the CSS font-family list occurs correctly and we don't include the same font in the list several times.
Attachment #280630 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 10•17 years ago
|
||
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → Core Graveyard
Reporter | ||
Updated•16 years ago
|
Component: GFX: Mac → GFX: Thebes
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•