Closed Bug 1020826 Opened 10 years ago Closed 10 years ago

Thai tones, vowels missing

Categories

(Core :: Graphics: Text, defect)

32 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla32
Tracking Status
firefox31 --- unaffected
firefox32 + verified

People

(Reporter: ananuti, Assigned: jfkthame)

References

Details

(Keywords: regression)

Attachments

(5 files)

Attached file pangram.html
str
- gfx.direct2d.disabled,true
- open pangram.html

the first bad revision is mozilla-inbound changeset 59b2dd6b5048

Graphics
--------

Adapter Description: Mobile Intel(R) 4 Series Express Chipset Family
Adapter Drivers: igdumdx32 igd10umd32
Adapter RAM: Unknown
ClearType Parameters: Gamma: 2200 Pixel Structure: R ClearType Level: 100 Enhanced Contrast: 100
Device ID: 0x2a42
DirectWrite Enabled: false (6.2.9200.16571)
Driver Date: 10-13-2011
Driver Version: 8.15.10.2555
GPU #2 Active: false
GPU Accelerated Windows: 1/1 Direct3D 9
Vendor ID: 0x8086
WebGL Renderer: Google Inc. -- ANGLE (Mobile Intel(R) 4 Series Express Chipset Family Direct3D9Ex vs_3_0 ps_3_0)
windowLayerManagerRemote: false
AzureCanvasBackend: skia
AzureContentBackend: cairo
AzureFallbackCanvasBackend: cairo
AzureSkiaAccelerated: 0
Attached image actual result
Attached image expected result
I think this only happen with MS Sans Serif font.
Hmm, this doesn't seem to reproduce for me on Win8.1.

What font is actually being used in your case? It can't be MS Sans Serif (as specified in the style), as that doesn't support Thai; so fallback must be happening. Please use the Fonts panel in the Inspector, or the Font Info add-on, to determine what font(s) are involved here.
Attached image inspector.png
(In reply to Jonathan Kew (:jfkthame) from comment #4)
> Hmm, this doesn't seem to reproduce for me on Win8.1.
> 
> What font is actually being used in your case? It can't be MS Sans Serif (as
> specified in the style), as that doesn't support Thai; so fallback must be
> happening. Please use the Fonts panel in the Inspector, or the Font Info
> add-on, to determine what font(s) are involved here.

both Inspector and Font Info show MS Sans Serif
That's very strange. Neither my Win8.1 nor XP machines show this. I'll try Win7 later when I get home. Setting needinfo? to remind myself to look again...
Flags: needinfo?(jfkthame)
Aha, now I understand what's happening. You have the Windows system locale set to Thai, right? In this case, Windows gives us a different MS Sans Serif font -- one that supports the Windows Thai codepage instead of Latin-1. And so it *does* use MS Sans Serif for the Thai characters.

I'm still not sure why the diacritics are disappearing altogether, but I suspect it may have something to do with harfbuzz trying (unsuccessfully) to do PUA-based Thai shaping, as this is a bitmap font and doesn't have OpenType tables.

Prior to bug 985220, the MS Sans Serif font, being a legacy bitmap font (.fon), would have gone through the Uniscribe or GDI shaper codepaths rather than harfbuzz.

If we can't come up with a simple fix here, we should probably back out that patch for now.
Flags: needinfo?(jfkthame)
(In reply to Jonathan Kew (:jfkthame) from comment #7)
> Aha, now I understand what's happening. You have the Windows system locale
> set to Thai, right? 

yes.
How about porting the font substitution (bug 642093) from DWrite? We don't support bitmap fonts with HWA enabled anyway. It will give more consistent behavior between HWA-enabled and disabled environments.
(In reply to Masatoshi Kimura [:emk] from comment #9)
> How about porting the font substitution (bug 642093) from DWrite? We don't
> support bitmap fonts with HWA enabled anyway. It will give more consistent
> behavior between HWA-enabled and disabled environments.

I wondered about that, although it would be a significant behavior change for the GDI case. Still, it's worth considering.

However, given that merge day is coming up, I think that for Fx32 we should revert bug 985220 (and bugs 1018034 and 1018551, which depend on it), to restore the previous behavior and give us more time to investigate and test this, and determine how to proceed. So I propose to push backouts of those three bugs tonight.

Once we have a solution for this issue ready, we can re-land those bugs - presumably for Fx33, as I don't expect to have time for much further investigation this weekend.
Merge of backouts:
https://hg.mozilla.org/mozilla-central/rev/0e387a554646
https://hg.mozilla.org/mozilla-central/rev/6be2448e325c
https://hg.mozilla.org/mozilla-central/rev/5cf33b3e3d5e
Assignee: nobody → jfkthame
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Flags: in-testsuite?
Keywords: regression
verified fixed on nightly 20140608030203.
Status: RESOLVED → VERIFIED
Thanks for verifying this. In addition, could you please test the Windows build from https://tbpl.mozilla.org/?tree=Try&rev=91b245c25b80, and confirm whether this also works correctly for you? In this build, the patches from bugs 985220, 1018034 and 1018551 have been re-landed, along with a fix that I think should resolve the Thai vowels/tones problem here, but I'd appreciate you checking the behavior.
Flags: needinfo?(ananuti)
Attached image sara-um.png
(In reply to Jonathan Kew (:jfkthame) from comment #14)

Compare to attachment 8434765 [details], that build works fine for me except Sara-um. See screenshot.
Flags: needinfo?(ananuti)
I was just going to ask you to try that one, then I saw you'd already commented. Thanks for your testing!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: