From 2f95e49b3659203c4e8d166280f5807f51a64306 Mon Sep 17 00:00:00 2001 From: nulano Date: Wed, 7 Sep 2022 19:34:34 +0200 Subject: [PATCH] add test using woff2 font with freetype --- Tests/fonts/LICENSE.txt | 1 + Tests/fonts/OpenSans.woff2 | Bin 0 -> 16740 bytes Tests/images/test_woff2.png | Bin 0 -> 6724 bytes Tests/test_imagefont.py | 18 ++++++++++++++++++ 4 files changed, 19 insertions(+) create mode 100644 Tests/fonts/OpenSans.woff2 create mode 100644 Tests/images/test_woff2.png diff --git a/Tests/fonts/LICENSE.txt b/Tests/fonts/LICENSE.txt index 104ff677c..da559b3d3 100644 --- a/Tests/fonts/LICENSE.txt +++ b/Tests/fonts/LICENSE.txt @@ -8,6 +8,7 @@ TINY5x3GX.ttf, from http://velvetyne.fr/fonts/tiny ArefRuqaa-Regular.ttf, from https://github.com/google/fonts/tree/master/ofl/arefruqaa ter-x20b.pcf, from http://terminus-font.sourceforge.net/ BungeeColor-Regular_colr_Windows.ttf, from https://github.com/djrrb/bungee +OpenSans.woff2, from https://fonts.googleapis.com/css?family=Open+Sans All of the above fonts are published under the SIL Open Font License (OFL) v1.1 (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL), which allows you to copy, modify, and redistribute them if you need to. diff --git a/Tests/fonts/OpenSans.woff2 b/Tests/fonts/OpenSans.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..15339ea9ccdd3bc54b25dfe54800f1c3bb730d26 GIT binary patch literal 16740 zcmV(_K-9l?Pew8T0RR9106}B`5&!@I0DF)C06_Zy0RR9100000000000000000000 z0000QVjCbFgir=xKT}jeR9*mr3) zsADuVl9*Sz(A_;0JQ(l|=aKIWKsT0w=wAkcGmuOvGbt({eSq3bpGk>Tmx+F!-{znD z2%|B+!+K^RD|CUd#^JI|j6y8zz{H4Pt^@5={6+R7i1y<*D|hds(ljIz$)yxaWMZR| z3XM_-Mf4rQ*i3PuA*iCMynIrp$&^HPK$bzKS_+|BD-SB_frkl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J)(3KRn_$LNp6f?=eYpdD!;lM zzgAPQz$BqG4X%GDO#Yo3&_sLVscCGyfLR+O z16u^)P0ubmDXHOXvwkct&G+&Vu3vB|KCD~8!fyLLO?X6vbyq4_bzmgUCZRA1@EK-& z>}O>o{50cAyyD{2CQhcNpXc4F)ZmP#yE~JhG+gsFZlWccx-;U7OiH?pIn|8MzHZ?UVu&i!u=#h|; zQ&NhJCw*u&b$55S{qO6|9X2+0_S~EtUZbyIVH3L+APTx3)K*tl2lwAN zZdzASkDx^-C)2ep%;k|#Q|B+X@Ub!xrJ3D7oeN>q(SO@x?z7v&u9w|wUJ)3GO`|OJ z{9{EX&P3Vx#&E87;V&C|`}<3^2ky3ZcI3*Y-R6QDT^(`sA_LD`{jUY)Zdl_Xf81vZ z3<`o>q!)J#T+5jv{gEOm1}=`9`~6VD?b!6~2u5J@wjhGV09U}k%F0U46ytQcXZP_5 z2sjl#Jbw@Q)VhUh7%DY2b&GmlpqO3fhJ>N@n3xS0hZuKrj;b zz5#!<)I@eCmgQ{-1g;N&roq-fxVSg}LU6q5sPn4E@OOAtO?PulQypbNku{nFn zp4giP$uStTkf5Lk_#V#o_G48qDI=cKybyfk=~<^XDe-!`Aw2v>7SCv+_=plfLIVV$ zN1IcDUFXE}i;HB8jM~fH`Vo8RVw0+GfByVw480NrNqhzBNSJ*4C>)%IoX2 z;K}LfUz8hy#gt;`9~^WTEqZi$d8u}o#HI@S>f>{{&=myR$q66#*1fLU=liU>V;cFUf&nw5_TGP|hQ&Ud^eDP`iv!j(O@wf6*_yd}!-4g`dgalw#lK5}Kpglz`2Tx{^7bFrp1-cJ^Sw1S Qc*TNHRn$@_xohhGKUSIoPyhe` literal 0 HcmV?d00001 diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py index 16da87d46..b9a0f6db5 100644 --- a/Tests/test_imagefont.py +++ b/Tests/test_imagefont.py @@ -1064,6 +1064,24 @@ class TestImageFont: assert_image_similar_tofile(im, "Tests/images/colr_bungee_mask.png", 22) + def test_woff2(self): + try: + font = ImageFont.truetype( + "Tests/fonts/OpenSans.woff2", + size=64, + layout_engine=self.LAYOUT_ENGINE, + ) + except OSError as e: + assert str(e) in ("unimplemented feature", "unknown file format") + pytest.skip("FreeType compiled without brotli or WOFF2 support") + + im = Image.new("RGB", (350, 100), "white") + d = ImageDraw.Draw(im) + + d.text((15, 5), "OpenSans", "black", font=font) + + assert_image_similar_tofile(im, "Tests/images/test_woff2.png", 5) + def test_fill_deprecation(self): font = self.get_font() with pytest.warns(DeprecationWarning):