Open Bug 701340 Opened 13 years ago Updated 2 years ago

שלום default sans-serif font appears wrong with "font-weight:800" or 900 (<b> inside bold - Arial Black doesn't support Hebrew)

Categories

(Core :: Layout: Text and Fonts, defect)

8 Branch
defect

Tracking

()

People

(Reporter: 7raivis, Unassigned)

References

()

Details

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2

Steps to reproduce:

Demo http://jsfiddle.net/laukstein/9AyLy/2/show/

FF8 breaks CSS `font-family` for `b` element/s when parent element/s has `font-weight: bold`


Actual results:

FF8 breaks CSS font-family property


Expected results:

font-family must be sans-serif
OS: Windows Vista → All
Hardware: x86 → All
Attached image Screenshot of testcase
Comment on attachment 573486 [details]
Screenshot of testcase

This print-screen is not related for the bug, it is not taken form FF8.
<b> is styled font-weight: bolder so presumably your chosen sans-serif font has a very bold weight.

Looking in a style viewer the 1st example has weight 900, 2nd and third 700.

If you add an "i" (say) to your test you will see that the font-family is still sans-serif.
John P Baker, you are not right. See this attached image and http://jsfiddle.net/9AyLy/3/show/ on FF8.
Attachment #573492 - Attachment is obsolete: true
> John P Baker, you are not right

John is right, that's the "<b> is bolder than bold issue". More explanation see bug 661790.
This is basically a dup of that bug. The font should look better, maybe.
Moving to  Core/Layout:Text.
Component: General → Layout: Text
Product: Firefox → Core
QA Contact: general → layout.fonts-and-text
O.K. The bug appears for `font-weight` value 800px till 900px.
Depends on: 661790
Summary: FF8 breaks CSS font-family for b element/s when parent element/s has font-weight: bold → שלום default sans-serif font appears wrong with "font-weight:800" or 900 (<b> inside bold)
This bug is related to hardware acceleration
The result shown in attachment 573820 [details] is correct behavior: the enhanced font family support in DirectWrite (compared to the old GDI model) means that the Arial Black face is recognized as a very-bold member of the Arial family. So when the base style already has "font-weight:bold", and you then use a <b> element which is styled as "font-weight:bolder", you get the face that is bolder than Arial Bold, namely Arial Black.

I'm confirming this bug because of the problem with the Hebrew example shown in attachment 573611 [details]. This arises because CSS style resolution leads us to Arial Black (as just described); but it turns out that Arial Black doesn't support Hebrew (whereas the Regular and Bold faces do). So once we've determined that the requested font weight, in the default sans-serif family, resolves to Arial Black, we then find that it doesn't have the necessary characters, and then font fallback kicks in and finds a different font.

IMO, it would be preferable in this case to try falling back to the nearest weight *of the same family* that does have the required characters, rather than deciding the family is not usable for this text. That would mean we'd end up with Arial Bold for the Hebrew here.

This is closely related to the behavior we see with italic-styled text with several font families that support Arabic only in their Regular face, but not in Italic; see bug 668813. I'm not sure offhand whether the patch there will also fix this example as it stands, but in any case that patch was backed out due to unexpected crashiness, and needs further debugging.

Marking as dependent on bug 668813, though it may actually be a dupe.
Status: UNCONFIRMED → NEW
Depends on: 668813
Ever confirmed: true
Summary: שלום default sans-serif font appears wrong with "font-weight:800" or 900 (<b> inside bold) → שלום default sans-serif font appears wrong with "font-weight:800" or 900 (<b> inside bold - Arial Black doesn't support Hebrew)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: