Open Bug 565766 Opened 14 years ago Updated 2 years ago

RTL text garbled for font-family:Verdana,Arial,sans-serif; on OSX 10.5

Categories

(Core :: Graphics, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: Pike, Unassigned)

References

Details

Attachments

(2 files)

I'm seeing funny garbled text for RTL text that's styled with 

font-family:Verdana,Arial,sans-serif;

This seems to be a recent regression on central, and probably bound to 10.5.
WFM with trunk build on 10.6.  Suspect this many be releated to a specific font.
Guessing this might be related to using the MS cmap that I'm just guessing here.

Axel, using FontBook could you note the version of Arial and where it's located?  Select Arial Regular, then Preview > Show Font Info.
Johnathan can reproduce on a vanilla 10.5.8, per irc.

And the culprit is apparently the installed Arial mess.

Further local testing confirms that Verdana isn't found at all, and sans-serif is fine, as is Arial Hebrew.
I think this was triggered by the landing of bug 554820.

However, I'm not entirely sure what's happening yet, and suspect that it may actually indicate an underlying flaw in our cmap-handling and font-matching behavior.
Blocks: 566150
The problem arises because on 10.5, Apple Type Services is returning a synthetic cmap table for Arial rather than the original cmap from the font, and the Unicode-platform subtable gets customized to modify the apparent character repertoire (hiding the Hebrew characters, I suspect, although I haven't fully disassembled it to check yet).

The patch in bug 554820 causes us to look at the Microsoft-platform subtable instead, which ATS doesn't munge; but then this leads to a mismatch when Core Text uses the modified table, decides the font doesn't support the characters, and does an internal fallback to some other font with incompatible glyph IDs.

I'm planning to back out bug 554820 as this is obviously an unacceptable mess, and will look into more refined approaches to solving that issue. Also wondering if we can reftest some of these things, though it'll be tricky as the behavior is OS-, version- and font-dependent .... and once we introduce harfbuzz, it'll be dependent on the renderer preference, too, as HB will not suffer from this confusion.
Blocks: 554820
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: