summaryrefslogtreecommitdiff
path: root/sw/qa/core/text/text.cxx
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-06-26 17:36:31 +0300
committerخالد حسني <khaled@libreoffice.org>2023-07-03 17:46:28 +0200
commit18575cc42464acdf28d8b5f271935f7dd87ec0fa (patch)
tree83b33cba76b0fc2e5d66427c3225ebd9216e499d /sw/qa/core/text/text.cxx
parent13c4456ca382a92b93395db367ef8edb27a349fa (diff)
Make the test more explicit
Add also comment about the embedded font. https: //lists.freedesktop.org/archives/libreoffice/2023-June/090532.html Change-Id: I65a7bb5e57bab2cdd4c9b322bee1d2b1b22a8813 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153621 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r--sw/qa/core/text/text.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 0997d64725b8..5e0c387ad8ac 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -1427,7 +1427,13 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testParaUpperMarginFlyIntersect)
CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
{
- // Load the document, which embeds a CJK font.
+ // Load the document.
+ // The document embeds a subset of "Source Han Serif SC" so that it works
+ // even when the font is not installed.
+ //
+ // Font subset created with:
+ //
+ // hb-subset SourceHanSerif.ttc -y 12 -u '20,3002,4FE1,540C,5E76,606F,610F,6237,6536,65B9,65E0,6B3E,6C42,7684,786E,8981,8BA4,8BEF,8D26,8D35,FF0C' -o SourceHanSerif.ttf
createSwDoc("tdf129810.odt");
// Render the document to a metafile.
@@ -1445,8 +1451,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
auto pTextArrayAction = static_cast<MetaTextArrayAction*>(pAction);
auto pDXArray = pTextArrayAction->GetDXArray();
- // There should be 13 chars on the first line
- CPPUNIT_ASSERT_GREATER(size_t(13), pDXArray.size());
+ // There should be 14 chars on the first line
+ CPPUNIT_ASSERT_EQUAL(size_t(14), pDXArray.size());
// Assert we are using the expected width for uncompressed chars
CPPUNIT_ASSERT_EQUAL(sal_Int32(720), pDXArray[0]);