Closed Bug 672955 Opened 13 years ago Closed 13 years ago

Thai pages not displaying some characters correctly


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

6 Branch
Not set



Tracking Status
firefox6 + fixed
firefox7 + fixed


(Reporter: cww, Assigned: jfkthame)



(1 file)

From input:

Thai characters aren't working correctly or consistently.

For example, some of the text on works but others don't. is another good example.

It seems that most people are complaining about thai facebook but that could be a function of the site's popularity.  All reports are OSX.
Component: General → Layout: Text
Product: Firefox → Core
QA Contact: general → layout.fonts-and-text
FWIW, the font info says that the corrupted display is diplayed in the "Microsoft Sans Serif" font.

Which matches the CSS style, font-family: "MS Sans Serif","Microsoft Sans Serif";
The problem here is that Microsoft Sans Serif includes Thai characters, but doesn't have AAT tables. I believe this causes Core Text to decide that it can't actually be used, and substitute some other font during its shaping. The result is that we end up with glyph IDs that don't correspond to the font that thebes thinks it's using.
This fixes the problem by preferring the HB shaper, which doesn't switch fonts behind our back.

It is configured to apply on OS X only for now, so that we don't change behavior on Windows; I believe the MS shaping engines do "sequence checking" and insert dotted circles in cases that they consider ill-formed. While this is a debatable practice, I don't want to change it as a side-effect of this bug; we should look into it separately.
Assignee: nobody → jfkthame
Attachment #547392 - Flags: review?(jdaggett)
Attachment #547392 - Flags: review?(jdaggett) → review+
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
Comment on attachment 547392 [details] [diff] [review]
patch, prefer HarfBuzz to Core Text for shaping Thai on OS X

I know it doesn't have bake time on trunk yet but this looks pretty safe and I really really want this on beta ASAP.
Attachment #547392 - Flags: approval-mozilla-beta?
Attachment #547392 - Flags: approval-mozilla-aurora?
Comment on attachment 547392 [details] [diff] [review]
patch, prefer HarfBuzz to Core Text for shaping Thai on OS X

Approved for releases/mozilla-aurora and releases/mozilla-beta. Please land asap.
Attachment #547392 - Flags: approval-mozilla-beta?
Attachment #547392 - Flags: approval-mozilla-beta+
Attachment #547392 - Flags: approval-mozilla-aurora?
Attachment #547392 - Flags: approval-mozilla-aurora+
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0a2) Gecko/20110731 Firefox/7.0a2
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0) Gecko/20100101 Firefox/6.0

Verified issue on FF 6.0b4 and Aurora using the links provided as examples in the Description - characters are correctly displayed.

Setting resolution to VERIFIED FIXED.
You need to log in before you can comment on or make changes to this bug.