From 55468ca01b4cdf274900fb752fbf9ae05a78705e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 4 Oct 2018 12:13:55 +0200 Subject: [PATCH] [test/text-rendering-tests] Update from upstream --- .../data/text-rendering-tests/Makefile.sources | 6 +++++- .../data/text-rendering-tests/extract-tests.py | 12 ++++++++++++ .../text-rendering-tests/fonts/TestGSUBThree.ttf | Bin 0 -> 1504 bytes .../fonts/TestMORXThirtyfour.ttf | Bin 0 -> 3608 bytes .../fonts/TestMORXThirtythree.ttf | Bin 0 -> 1520 bytes .../fonts/TestMORXTwentyfour.ttf | Bin 0 -> 1828 bytes .../data/text-rendering-tests/tests/GSUB-3.tests | 1 + .../text-rendering-tests/tests/MORX-24.tests | 1 + .../text-rendering-tests/tests/MORX-32.tests | 8 ++++---- .../text-rendering-tests/tests/MORX-33.tests | 3 +++ .../text-rendering-tests/tests/MORX-34.tests | 1 + test/shaping/run-tests.py | 15 +++++++++------ 12 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 test/shaping/data/text-rendering-tests/fonts/TestGSUBThree.ttf create mode 100644 test/shaping/data/text-rendering-tests/fonts/TestMORXThirtyfour.ttf create mode 100644 test/shaping/data/text-rendering-tests/fonts/TestMORXThirtythree.ttf create mode 100644 test/shaping/data/text-rendering-tests/fonts/TestMORXTwentyfour.ttf create mode 100644 test/shaping/data/text-rendering-tests/tests/GSUB-3.tests create mode 100644 test/shaping/data/text-rendering-tests/tests/MORX-24.tests create mode 100644 test/shaping/data/text-rendering-tests/tests/MORX-33.tests create mode 100644 test/shaping/data/text-rendering-tests/tests/MORX-34.tests diff --git a/test/shaping/data/text-rendering-tests/Makefile.sources b/test/shaping/data/text-rendering-tests/Makefile.sources index 6fe174e49..79f22adb4 100644 --- a/test/shaping/data/text-rendering-tests/Makefile.sources +++ b/test/shaping/data/text-rendering-tests/Makefile.sources @@ -15,6 +15,7 @@ TESTS = \ tests/GPOS-5.tests \ tests/GSUB-1.tests \ tests/GSUB-2.tests \ + tests/GSUB-3.tests \ tests/GVAR-1.tests \ tests/GVAR-2.tests \ tests/GVAR-3.tests \ @@ -42,6 +43,7 @@ TESTS = \ tests/MORX-21.tests \ tests/MORX-22.tests \ tests/MORX-23.tests \ + tests/MORX-24.tests \ tests/MORX-25.tests \ tests/MORX-26.tests \ tests/MORX-27.tests \ @@ -50,6 +52,9 @@ TESTS = \ tests/MORX-2.tests \ tests/MORX-30.tests \ tests/MORX-31.tests \ + tests/MORX-32.tests \ + tests/MORX-33.tests \ + tests/MORX-34.tests \ tests/MORX-3.tests \ tests/MORX-4.tests \ tests/MORX-5.tests \ @@ -68,5 +73,4 @@ DISBALED_TESTS = \ tests/SHBALI-2.tests \ tests/SHKNDA-2.tests \ tests/SHKNDA-3.tests \ - tests/MORX-32.tests \ $(NULL) diff --git a/test/shaping/data/text-rendering-tests/extract-tests.py b/test/shaping/data/text-rendering-tests/extract-tests.py index 2292cf45d..27d568615 100755 --- a/test/shaping/data/text-rendering-tests/extract-tests.py +++ b/test/shaping/data/text-rendering-tests/extract-tests.py @@ -28,6 +28,7 @@ def glyphstr(glyphs): html = ET.fromstring(sys.stdin.read()) found = False + for elt in html.findall(".//*[@class='expected'][@ft:id]", namespaces): found = True name = elt.get(ns('ft:id')) @@ -47,4 +48,15 @@ for elt in html.findall(".//*[@class='expected'][@ft:id]", namespaces): opts = opts + ' --variations=%s' % variations print ("../fonts/%s:%s:%s:%s" % (font, opts, unistr(text), glyphstr(glyphs))) +for elt in html.findall(".//*[@class='should-not-crash'][@ft:id]", namespaces): + found = True + name = elt.get(ns('ft:id')) + text = elt.get(ns('ft:render')) + font = elt.get(ns('ft:font')) + variations = elt.get(ns('ft:var'), '').replace(':', '=').replace(';', ',') + opts = '' + if variations: + opts = '--variations=%s' % variations + print ("../fonts/%s:%s:%s:*" % (font, opts, unistr(text))) + sys.exit(0 if found else 1) diff --git a/test/shaping/data/text-rendering-tests/fonts/TestGSUBThree.ttf b/test/shaping/data/text-rendering-tests/fonts/TestGSUBThree.ttf new file mode 100644 index 0000000000000000000000000000000000000000..8fce4ac4dd893ef65fa6f504c69c77f616f7e146 GIT binary patch literal 1504 zcma)6&uk!*c)%ujn`Tm zL0loh0kuLxLRDM!Pbdd^se0qoL&c%zRy|cMsG?FYAXu4|^+(jdacryca^mU};+vFdhs35!m?VBc+2O2q&nGJQjrN~Y-|BjG3s=#g{yX)} ztJe88I(UP+-e0w>Rr}%kPY(e}e{!Pjb-LJ!OMt2EcR|Naxp?a2?b_h%9}vb}GWg-g z#COqnxP?q`$52wow+T|SY+Pg94QA-`H1=(LYScnc(OlGc8@v-b^l4`n`&8*46UT^)L+@H(k*Y8c{a+7j!q$dYR-tT2{c{z~R zGxzg6xImTOZ}7$$YjLPJR6Q;qt?LN)1%Jw&aui$eDw82OHab2&wRgH$NT-L*bg?i! z#XY&D-1%W=&O30q`(}Ip#{2W-cNP}P<+nci_~3;Tm#-cC;6%;yYBkrb>EmDkUp_lu zhPu8N-EZM*MOgCPUyregVH9GVB%X_LKe9L#<86%lg1%w1pPpvJ%FtL~JF`0CCHMV4 z#wPRdPK=Y-B?e;Lj}ogUvfqZJ=pFLfYyL{p>8k6hkl!<-s;!l}*RXTyXsbT4Xm`50 z{uUkIw##<&tZVsy@-vv*b0D)oQ4U)u}s{D*4tq+jl(|hv1=& zHTYOT6Arq}nCp}RvuF>qLhj__J5-PM0%b66KtoX;*m6w2zebBo&xF%{q+C< literal 0 HcmV?d00001 diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXThirtyfour.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXThirtyfour.ttf new file mode 100644 index 0000000000000000000000000000000000000000..a70dadccf471cb7799126548a82d5f72060acef3 GIT binary patch literal 3608 zcmeHJYfM|$9si$Wa}A*ojC~CO=3HZ9^DxG*d+iWHD1HDjU}JD`N*?x%@pZy0##u3u z2wlFltJF11RVk{pb^XvzO216&mu=FjeTgb<*`}gsmk-PG*1CRhp)7iDmCj1=kBmX1hr}L}j zm12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%OJW!(4%33$V^&z12ITI3V9h< z7Ew}$6=>)FHBejZeR`I{G5dH_7!GExs$KAFtMj2-T#&PEiynvAu6^Z&EqWV4c z^;JRgx2YK^4TK;H2E4a;FhLu%+sEZ@_*J;edS;Qt;6e+6DE BG#&r| literal 0 HcmV?d00001 diff --git a/test/shaping/data/text-rendering-tests/fonts/TestMORXThirtythree.ttf b/test/shaping/data/text-rendering-tests/fonts/TestMORXThirtythree.ttf new file mode 100644 index 0000000000000000000000000000000000000000..5cab73e5a59088653a171dea221450a4159f540d GIT binary patch literal 1520 zcmbVM+iN3L82`!UBaYU+isk;X>JX&XlWLqblXZVCcBHVLo#L}&4o$U zHeD2N_^=NmEQsRMBBG0zHx~q7h5ZZMM=z)>ULLlt;>$Mv&SX$nRuIqdo$vQu&v(xG z&OiZhKVE{0`17ey{3+^`aj_YB?CA-t1;MKZY>Es_tg$*?P0)YBWrFF$#GYJ{rrOn<~yJ zZ=w&!#3fOnZl%YSA`*%refm7dyV>?iehrJzVXHc8xXzld(?{+F%55P}Qtws9{1Ee) z70+RtT3NkH3UQX+A!vw`ALA!&I!xHz?mwveZTCv|-CkyDT>wfKF4H^9EVIML|)Wd#^DQ7(#gr>A|jb_KGR_wNZRZqm{v-)#|8?NZF)M? zbVxRl#czXD;qPacZSDNW82x`m&D<5W$rW3y)F#)l#MMpgu^PwKxNnCO(EW_tz1PsF zRB;+Bw`=m&27^(VdEV@8==?l z_xawR=e*~9FBE{ycoQ~Mg~FBoSaEC;P&eQftr+@n4xnqIIX$(Oa^un-44tcwgq z->t}|B$;K{Z2QzakxhC|cTwM;UR4BsRW1f%{HW2f|6mLEY+$d=Acq^|e1mqf7pMnX zDru0}K}003euHxyrf!FyY)xGblNNFS!pz0Dc)E~5Tq;o++emm@E~_2)Zx^v%_P&UQWjWU%r!GmyJ( zXRcfnksFl1(CxB2-17E%ody2dnrffd>vje*lB$?H-n9GdOyaM*UHig^j?TXvYKxrE zi)}r-!jES^J#W6M7n8T@g7ww+k{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