mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
bug 553571 - try to avoid breaking font runs at ZWNJ when using font fallback, because Indic scripts require shaping across the ZWNJ character. r=roc
This commit is contained in:
parent
456ca10684
commit
ca191217c7
@ -2572,9 +2572,9 @@ gfxFontGroup::FindFontForChar(PRUint32 aCh, PRUint32 aPrevCh,
|
||||
{
|
||||
nsRefPtr<gfxFont> selectedFont;
|
||||
|
||||
// if this character or the previous one is a join-causer,
|
||||
// if this character is a join-control or the previous is a join-causer,
|
||||
// use the same font as the previous range if we can
|
||||
if (gfxFontUtils::IsJoinCauser(aCh) || gfxFontUtils::IsJoinCauser(aPrevCh)) {
|
||||
if (gfxFontUtils::IsJoinControl(aCh) || gfxFontUtils::IsJoinCauser(aPrevCh)) {
|
||||
if (aPrevMatchedFont && aPrevMatchedFont->HasCharacter(aCh)) {
|
||||
selectedFont = aPrevMatchedFont;
|
||||
return selectedFont.forget();
|
||||
|
@ -755,6 +755,10 @@ public:
|
||||
return (ch == 0x200D);
|
||||
}
|
||||
|
||||
static inline bool IsJoinControl(PRUint32 ch) {
|
||||
return (ch == 0x200C || ch == 0x200D);
|
||||
}
|
||||
|
||||
enum {
|
||||
kUnicodeVS1 = 0xFE00,
|
||||
kUnicodeVS16 = 0xFE0F,
|
||||
|
6
layout/reftests/bugs/553571-1-notref.html
Normal file
6
layout/reftests/bugs/553571-1-notref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
ඔ‌ෘ
|
||||
</body>
|
||||
</html>
|
||||
|
6
layout/reftests/bugs/553571-1.html
Normal file
6
layout/reftests/bugs/553571-1.html
Normal file
@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
ඔෘ
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1477,6 +1477,9 @@ random-if(!haveTestPlugin) == 546071-1.html 546071-1-ref.html
|
||||
== 551463-1.html 551463-1-ref.html
|
||||
== 551699-1.html 551699-1-ref.html
|
||||
== 552334-1.html 552334-1-ref.html
|
||||
# 553571 depends on MS Indic shaping behavior and Win7 font support;
|
||||
# not expected to be reliable on XP or non-Windows platforms
|
||||
random-if(!winWidget) random-if(/^Windows\x20NT\x205/.test(http.oscpu)) != 553571-1.html 553571-1-notref.html # expect dotted circle in test, not in ref
|
||||
random-if(d2d) == 555388-1.html 555388-1-ref.html
|
||||
== 556661-1.html 556661-1-ref.html
|
||||
fails-if(Android) == 557087-1.html 557087-ref.html
|
||||
|
Loading…
Reference in New Issue
Block a user