Commit f5263608 authored by Jonathan Kew's avatar Jonathan Kew
Browse files

Bug 1836024 - Don't mask Devanagari DANDA characters from the font cmap when...

Bug 1836024 - Don't mask Devanagari DANDA characters from the font cmap when shaping support is absent, as they may be used by other scripts. r=emilio

Also a couple more Arabic-block characters that were not handled in bug 1834316, per comment 3.

Differential Revision: https://phabricator.services.mozilla.com/D179670
parent 15ab4b46
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -83,11 +83,21 @@ const gfxFontEntry::ScriptRange gfxPlatformFontList::sComplexScriptRanges[] = {
    // skip 061B Arabic semicolon, also used by N'Ko etc
    {0x061C, 0x061E, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    // skip 061F Arabic question mark, also used by N'Ko etc
    {0x0620, 0x06FF, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    {0x0620, 0x063F, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    // skip 0640 Arabic tatweel (for syriac, adlam, etc)
    {0x0641, 0x06D3, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    // skip 06D4 Arabic full stop (for hanifi rohingya)
    {0x06D5, 0x06FF, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    {0x0700, 0x074F, 1, {TRUETYPE_TAG('s', 'y', 'r', 'c'), 0, 0}},
    {0x0750, 0x077F, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    {0x08A0, 0x08FF, 1, {TRUETYPE_TAG('a', 'r', 'a', 'b'), 0, 0}},
    {0x0900,
     0x0963,
     2,
     {TRUETYPE_TAG('d', 'e', 'v', '2'), TRUETYPE_TAG('d', 'e', 'v', 'a'), 0}},
    // skip 0964 DEVANAGARI DANDA and 0965 DEVANAGARI DOUBLE DANDA, shared by
    // various other Indic writing systems
    {0x0966,
     0x097F,
     2,
     {TRUETYPE_TAG('d', 'e', 'v', '2'), TRUETYPE_TAG('d', 'e', 'v', 'a'), 0}},
+20 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<meta charset=utf-8>
<style>
@font-face {
  font-family: devanagari;
  src: local("Devanagari Sangam MN");
  size-adjust: 150%;
}
p {
  font-family: Noto Sans Limbu, devanagari, sans-serif;
  font-size: 32px;
  line-height: 3;
}
span {
  font-family: devanagari, sans-serif;
}
</style>

<div>The double-danda character should NOT fall back to the oversized Devanagari font</div>
<p>ᤛᤧᤘᤠᤖᤥ᥄ ᤀᤠᤍᤠᤱᤒᤠ ᤜᤠᤍᤠᤱᤔᤠᤛᤣ ᤗᤠᤶᤎᤡᤱᤃᤥ ᤗᤠᤶᤎᤰ ᤕᤠᤰᤌᤢᤱᤐᤠᤴ ᤖᤧ ᤘᤡᤁᤡᤐᤡᤍᤡᤕᤠ ᤀᤥ <span></span></p>
+22 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<meta charset=utf-8>
<style>
<!-- Create a Devanagari face with extra scaling, to make the difference from the
     Limbu font more visually obvious if the fallback gets used. -->
@font-face {
  font-family: devanagari;
  src: local("Devanagari Sangam MN"), local("Devanagari MN");
  size-adjust: 150%;
}
p {
  font-family: Noto Sans Limbu, devanagari, sans-serif;
  font-size: 32px;
  line-height: 3;
}
</style>

<div>The double-danda character should NOT fall back to the oversized Devanagari font</div>
<!-- DEVANAGARI DOUBLE DANDA is in the Devanagari block, but is also used in Limbu
     and does not require script-specific shaping, so should not be masked from the
     Noto Sans Limbu character map despite the lack of 'deva' shaping support. -->
<p>ᤛᤧᤘᤠᤖᤥ᥄ ᤀᤠᤍᤠᤱᤒᤠ ᤜᤠᤍᤠᤱᤔᤠᤛᤣ ᤗᤠᤶᤎᤡᤱᤃᤥ ᤗᤠᤶᤎᤰ ᤕᤠᤰᤌᤢᤱᤐᤠᤴ ᤖᤧ ᤘᤡᤁᤡᤐᤡᤍᤡᤕᤠ ᤀᤥ ॥</p>
+1 −0
Original line number Diff line number Diff line
@@ -2142,3 +2142,4 @@ pref(layout.testing.overlay-scrollbars.always-visible,true) pref(ui.useOverlaySc
pref(layout.testing.overlay-scrollbars.always-visible,true) pref(ui.useOverlayScrollbars,1) fuzzy-if(winWidget,0-21,0-134) fuzzy-if(cocoaWidget,0-2,0-12) == 1828879-1.html 1828879-1-ref.html
skip-if(!OSX) != 1834316-1.html 1834316-1-notref.html
skip-if(!OSX) test-pref(layout.css.font-visibility.standard,1) ref-pref(layout.css.font-visibility.standard,3) == 1835271-1.html 1835271-1-ref.html
skip-if(!OSX) != 1836024-1.html 1836024-1-notref.html