diff --git a/layout/reftests/fonts/math/dtls-1.otf b/layout/reftests/fonts/math/dtls-1.otf new file mode 100644 index 00000000000..1ffbe244273 Binary files /dev/null and b/layout/reftests/fonts/math/dtls-1.otf differ diff --git a/layout/reftests/fonts/math/generate.py b/layout/reftests/fonts/math/generate.py index 70f24703f2e..59d2a9cb487 100644 --- a/layout/reftests/fonts/math/generate.py +++ b/layout/reftests/fonts/math/generate.py @@ -65,6 +65,31 @@ def createSquareGlyph(aFont, aCodePoint): p.lineTo(0, em) p.closePath(); +def createLLTriangleGlyph(aFont, aCodePoint): + g = aFont.createChar(aCodePoint) + p = g.glyphPen() + p.moveTo(0, 0) + p.lineTo(em, 0) + p.lineTo(0, em) + p.closePath(); + +def createURTriangleGlyph(aFont, aCodePoint): + g = aFont.createChar(aCodePoint) + p = g.glyphPen() + p.moveTo(em, 0) + p.lineTo(em, em) + p.lineTo(0, em) + p.closePath(); + +def createDiamondGlyph(aFont, aCodePoint): + g = aFont.createChar(aCodePoint) + p = g.glyphPen() + p.moveTo(0, em/2) + p.lineTo(em/2, 0) + p.lineTo(em, em/2) + p.lineTo(em/2, em) + p.closePath(); + ################################################################################ # Glyph variants and constructions f = newMathFont("stretchy") @@ -497,3 +522,20 @@ f.math.AccentBaseHeight = 6 * em f.math.FlattenedAccentBaseHeight = 3 * em createSquareGlyph(f, ord("~")) saveMathFont(f) + +f = newMathFont("dtls-1") +createSquareGlyph(f, ord("a")) +createLLTriangleGlyph(f, ord("b")) +createSquareGlyph(f, ord("c")) +createDiamondGlyph(f, 0x1D51E) #mathvariant=fraktur a +createURTriangleGlyph(f, 0x1D51F) #mathvariant=fraktur b +createDiamondGlyph(f, 0x1D520) #mathvariant=fraktur c +f.addLookup("gsub", "gsub_single", (), (("dtls", (("latn", ("dflt")),)),)) +f.addLookupSubtable("gsub", "gsub_n") +glyph = f["a"] +glyph.addPosSub("gsub_n", "b") +glyph2 = f[0x1D51F] +glyph2.glyphname="urtriangle" +glyph3 = f[0x1D51E] +glyph3.addPosSub("gsub_n", "urtriangle") +saveMathFont(f) diff --git a/layout/reftests/mathml/dtls-1-ref.html b/layout/reftests/mathml/dtls-1-ref.html new file mode 100644 index 00000000000..0a88f8ba8b4 --- /dev/null +++ b/layout/reftests/mathml/dtls-1-ref.html @@ -0,0 +1,132 @@ + + + + + + + + b + c + + + c + c + + + b + c + c + + + +

+ + + + + b + b + + c + + + + b + b + + + b + c + + + + + b + b + b + + c + c + + + + b + b + b + + + b + c + c + + + b + c + c + + + + +

+ + + + c + c + + + c + c + + + c + c + c + + + +

+ + + + c + c + + + c + c + c + + + +

+ + + + c + c + + + c + c + c + + + c + c + + + c + c + c + + + diff --git a/layout/reftests/mathml/dtls-1.html b/layout/reftests/mathml/dtls-1.html new file mode 100644 index 00000000000..5621e81d580 --- /dev/null +++ b/layout/reftests/mathml/dtls-1.html @@ -0,0 +1,134 @@ + + + + + + + + a + a + + + a + a + + + a + a + a + + + +

+ + + + + a + a + + a + + + + a + a + + + a + a + + + + + a + a + a + + a + a + + + + a + a + a + + + a + a + a + + + a + a + a + + + + +

+ + + + + a + a + + + a + a + + + a + a + a + + + + +

+ + + + a + a + + + a + a + a + + + +

+ + + + a + a + + + a + a + a + + + a + a + + + a + a + a + + + diff --git a/layout/reftests/mathml/dtls-2-ref.html b/layout/reftests/mathml/dtls-2-ref.html new file mode 100644 index 00000000000..20f0aa75725 --- /dev/null +++ b/layout/reftests/mathml/dtls-2-ref.html @@ -0,0 +1,175 @@ + + + + + + + + + + + b + c + + + + +

+ + + + + b + c + + + + +

+ + + + + b + + + + + +

+ + + + c + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + + + + b + + + + c + + + + +

+ + + + + + b + c + + + b + c + + + + + +

+ + + + + + c + c + + + c + c + + + + + +

+ + + + + b + c + + + + +

+ + + + + c + c + + + + +

+ + + + + c + c + + + + +

+ + + + + c + c + + + + +

+ + + + + b + c + + + + + diff --git a/layout/reftests/mathml/dtls-2.html b/layout/reftests/mathml/dtls-2.html new file mode 100644 index 00000000000..8cee767dd3a --- /dev/null +++ b/layout/reftests/mathml/dtls-2.html @@ -0,0 +1,213 @@ + + + + + + + + + + a + + + + +

+ + + + + a + + + + + +

+ + + + + a + a + + + + +

+ + + + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + + + + + + + a + + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + + + + diff --git a/layout/reftests/mathml/dtls-3-ref.html b/layout/reftests/mathml/dtls-3-ref.html new file mode 100644 index 00000000000..9d3b985cba9 --- /dev/null +++ b/layout/reftests/mathml/dtls-3-ref.html @@ -0,0 +1,175 @@ + + + + + + + + + + + 𝔟 + 𝔠 + + + + +

+ + + + + 𝔟 + 𝔠 + + + + +

+ + + + + 𝔟 + + + + + +

+ + + + 𝔠 + + + +

+ + + + + + 𝔟 + 𝔟 + + + 𝔟 + 𝔠 + + + + + +

+ + + + + + + + 𝔟 + + + + 𝔠 + + + + +

+ + + + + + 𝔟 + 𝔠 + + + 𝔟 + 𝔠 + + + + + +

+ + + + + + 𝔠 + 𝔠 + + + 𝔠 + 𝔠 + + + + + +

+ + + + + 𝔟 + 𝔠 + + + + +

+ + + + + 𝔠 + 𝔠 + + + + +

+ + + + + 𝔠 + 𝔠 + + + + +

+ + + + + 𝔞 + c + + + + +

+ + + + + b + c + + + + + diff --git a/layout/reftests/mathml/dtls-3.html b/layout/reftests/mathml/dtls-3.html new file mode 100644 index 00000000000..d0d833b5e28 --- /dev/null +++ b/layout/reftests/mathml/dtls-3.html @@ -0,0 +1,216 @@ + + + + + + + + + + a + + + + +

+ + + + + a + + + + + +

+ + + + + a + a + + + + +

+ + + + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + + + + + + + a + + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + + a + a + + + a + a + + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + +

+ + + + + a + a + + + + + + + diff --git a/layout/reftests/mathml/reftest.list b/layout/reftests/mathml/reftest.list index b31eb7d6e43..eaae21f198d 100644 --- a/layout/reftests/mathml/reftest.list +++ b/layout/reftests/mathml/reftest.list @@ -280,6 +280,9 @@ fails-if(B2G||Android||/^Windows\x20NT\x205\.1/.test(http.oscpu)||OSX) == mathva == mathvariant-3.html mathvariant-3-ref.html == mathvariant-4.html mathvariant-4-ref.html == mathvariant-5.html mathvariant-5-ref.html +== dtls-1.html dtls-1-ref.html +== dtls-2.html dtls-2-ref.html +== dtls-3.html dtls-3-ref.html == ssty-1.html ssty-1-ref.html == ssty-2.html ssty-2-ref.html == ssty-3.html ssty-3-ref.html