From 2f2803a77af3bfdab979bd44ce61866e6985d172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 2 Nov 2023 16:40:42 +0000 Subject: [PATCH] Related: tdf#157939 put CppunitTest_svgio under non_application_font_use:abort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib48e8045ad739b6f6fe98ab00cd609b54d4c3113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158843 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svgio/CppunitTest_svgio.mk | 5 +++++ svgio/qa/cppunit/SvgImportTest.cxx | 8 ++++---- svgio/qa/cppunit/data/FontsizeRelative.svg | 4 ++-- svgio/qa/cppunit/data/em_units.svg | 4 ++-- svgio/qa/cppunit/data/masking-path-07-b.svg | 8 ++++---- svgio/qa/cppunit/data/tdf103888.svg | 2 +- svgio/qa/cppunit/data/tdf123926.svg | 2 +- svgio/qa/cppunit/data/tdf156167.svg | 2 +- svgio/qa/cppunit/data/tdf156168.svg | 2 +- svgio/qa/cppunit/data/tdf97542_1.svg | 2 +- svgio/qa/cppunit/data/tdf97542_2.svg | 2 +- svgio/qa/cppunit/data/tdf99994.svg | 2 +- svgio/qa/cppunit/data/tspan-fill-opacity.svg | 2 +- 13 files changed, 25 insertions(+), 20 deletions(-) diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk index 1bd6c3b0b5d0..9309f5dcb9b8 100644 --- a/svgio/CppunitTest_svgio.mk +++ b/svgio/CppunitTest_svgio.mk @@ -70,4 +70,9 @@ $(eval $(call gb_CppunitTest_use_components,svgio,\ $(eval $(call gb_CppunitTest_use_configuration,svgio)) +# assert if font/glyph fallback occurs +$(eval $(call gb_CppunitTest_set_non_application_font_use,svgio,abort)) + +$(eval $(call gb_CppunitTest_use_more_fonts,svgio)) + # vim: set noet sw=4 ts=4: diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index fcd76f12bd1f..91bb2efe53c3 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -377,12 +377,12 @@ CPPUNIT_TEST_FIXTURE(Test, testFontsizeRelative) assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "fontcolor", "#000000"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "text", "Sample"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "familyname", "serif"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "familyname", "DejaVu Serif"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "fontcolor", "#000000"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", "Sample"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "height", "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "familyname", "serif"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "familyname", "DejaVu Serif"); } CPPUNIT_TEST_FIXTURE(Test, testTdf145896) @@ -932,7 +932,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf97542_1) assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion", "fontcolor", "#ffff00"); assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion", "text", "Text"); assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion", "height", "48"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion", "familyname", "serif"); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion", "familyname", "DejaVu Serif"); } CPPUNIT_TEST_FIXTURE(Test, testTdf97542_2) @@ -1382,7 +1382,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf99994) assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "fontcolor", "#0000ff"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "16"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "text", "test"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "familyname", "Sans"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "familyname", "DejaVu Sans"); } CPPUNIT_TEST_FIXTURE(Test, testTdf99115) diff --git a/svgio/qa/cppunit/data/FontsizeRelative.svg b/svgio/qa/cppunit/data/FontsizeRelative.svg index b957b90a3a11..4b74aa692b38 100644 --- a/svgio/qa/cppunit/data/FontsizeRelative.svg +++ b/svgio/qa/cppunit/data/FontsizeRelative.svg @@ -1,6 +1,6 @@ - + Sample - Sample + Sample diff --git a/svgio/qa/cppunit/data/em_units.svg b/svgio/qa/cppunit/data/em_units.svg index 1ad4d3e3a769..6a7947cb3c09 100644 --- a/svgio/qa/cppunit/data/em_units.svg +++ b/svgio/qa/cppunit/data/em_units.svg @@ -1,8 +1,8 @@ diff --git a/svgio/qa/cppunit/data/masking-path-07-b.svg b/svgio/qa/cppunit/data/masking-path-07-b.svg index 63f73d821f53..eca3660bab5e 100644 --- a/svgio/qa/cppunit/data/masking-path-07-b.svg +++ b/svgio/qa/cppunit/data/masking-path-07-b.svg @@ -53,13 +53,13 @@ $RCSfile: masking-path-07-b.svg,v $ - + - + @@ -134,14 +134,14 @@ - + $Revision: 1.11 $ diff --git a/svgio/qa/cppunit/data/tdf103888.svg b/svgio/qa/cppunit/data/tdf103888.svg index 1663fa395e40..157bb12571f7 100644 --- a/svgio/qa/cppunit/data/tdf103888.svg +++ b/svgio/qa/cppunit/data/tdf103888.svg @@ -5,7 +5,7 @@ height="15mm" viewBox="0 0 250 50"> Hervorhebung diff --git a/svgio/qa/cppunit/data/tdf123926.svg b/svgio/qa/cppunit/data/tdf123926.svg index 1a5c2758aab4..085b736b53c3 100644 --- a/svgio/qa/cppunit/data/tdf123926.svg +++ b/svgio/qa/cppunit/data/tdf123926.svg @@ -1,6 +1,6 @@ - + diff --git a/svgio/qa/cppunit/data/tdf156167.svg b/svgio/qa/cppunit/data/tdf156167.svg index 5ab1254013c4..034f86563d26 100644 --- a/svgio/qa/cppunit/data/tdf156167.svg +++ b/svgio/qa/cppunit/data/tdf156167.svg @@ -1,7 +1,7 @@ - + diff --git a/svgio/qa/cppunit/data/tdf156168.svg b/svgio/qa/cppunit/data/tdf156168.svg index 2cdbd35afd09..352de2be315e 100644 --- a/svgio/qa/cppunit/data/tdf156168.svg +++ b/svgio/qa/cppunit/data/tdf156168.svg @@ -4,7 +4,7 @@ width="100%" height="100%" viewBox="0 0 200 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - style="font-family: 'Times New Roman', serif; + style="font-family: 'DejaVu Serif'; font-size:large" > stroke enabled diff --git a/svgio/qa/cppunit/data/tdf97542_1.svg b/svgio/qa/cppunit/data/tdf97542_1.svg index 328bd971ac8e..7ade92dd94ac 100644 --- a/svgio/qa/cppunit/data/tdf97542_1.svg +++ b/svgio/qa/cppunit/data/tdf97542_1.svg @@ -10,6 +10,6 @@ Layer 1 - Text + Text diff --git a/svgio/qa/cppunit/data/tdf97542_2.svg b/svgio/qa/cppunit/data/tdf97542_2.svg index 03cee9683e0b..4a4c7e12764c 100644 --- a/svgio/qa/cppunit/data/tdf97542_2.svg +++ b/svgio/qa/cppunit/data/tdf97542_2.svg @@ -10,6 +10,6 @@ Layer 1 - Text + Text diff --git a/svgio/qa/cppunit/data/tdf99994.svg b/svgio/qa/cppunit/data/tdf99994.svg index b4dec353e159..b948338c14ee 100644 --- a/svgio/qa/cppunit/data/tdf99994.svg +++ b/svgio/qa/cppunit/data/tdf99994.svg @@ -2,7 +2,7 @@ - + test diff --git a/svgio/qa/cppunit/data/tspan-fill-opacity.svg b/svgio/qa/cppunit/data/tspan-fill-opacity.svg index ef6d5352a8d2..0fe6a1cd8d5c 100644 --- a/svgio/qa/cppunit/data/tspan-fill-opacity.svg +++ b/svgio/qa/cppunit/data/tspan-fill-opacity.svg @@ -9,7 +9,7 @@ - hello + hello