Usage of Source Han Serif SC

Rene Engelhard rene at debian.org
Sun Jun 25 11:16:16 UTC 2023


Hi,

I get the following in my build of the libreoffice-7-6 branch:

CUT] sw_core_text
S=/home/rene/LibreOffice/git/libreoffice-7-6 && I=$S/instdir && 
W=$S/workdir &&  mkdir -p $W/CppunitTest/ && rm -fr 
$W/CppunitTest/sw_core_text.test.user && cp -r $W/unittest 
$W/CppunitTest/sw_core_text.test.user &&    rm -fr 
$W/CppunitTest/sw_core_text.test.core && mkdir 
$W/CppunitTest/sw_core_text.test.core && cd 
$W/CppunitTest/sw_core_text.test.core &&  (  MAX_CONCURRENCY=4 
MOZILLA_CERTIFICATE_FOLDER=dbm: 
SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 SAL_USE_VCLPLUGIN=svp 
LIBO_LANG=C 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs 
          $W/LinkTarget/Executable/cppunittester 
$W/LinkTarget/CppunitTest/libtest_sw_core_text.so --headless 
"-env:BRAND_BASE_DIR=file://$S/instdir" "-env:BRAND_SHARE_SUBDIR=share" 
"-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" 
"-env:UserInstallation=file://$W/CppunitTest/sw_core_text.test.user" 
"-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry 
xcsxcu:file://$W/unittest/registry-common 
xcsxcu:file://$W/unittest/registry-user-ui" 
"-env:UNO_TYPES=file://$I/program/types.rdb 
file://$I/program/types/offapi.rdb file://$I/program/types/oovbaapi.rdb" 
  "-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb 
file://$W/Rdb/services.rdb" -env:URE_BIN_DIR=file://$I/program 
-env:URE_INTERNAL_LIB_DIR=file://$I/program 
-env:LO_LIB_DIR=file://$I/program 
-env:LO_JAVA_DIR=file://$I/program/classes --protector 
$W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector 
--protector $W/LinkTarget/Library/unobootstrapprotector.so 
unobootstrapprotector   --protector 
$W/LinkTarget/Library/libvclbootstrapprotector.so vclbootstrapprotector 
  "-env:CPPUNITTESTTARGET=$W/CppunitTest/sw_core_text.test"  ) 2>&1
[...]
[_RUN_____] testTdf129810::TestBody
file:///home/rene/LibreOffice/git/libreoffice-7-6//sw/qa/core/text/data//tdf129810.odt:
./sw/qa/core/text/text.cxx:1387:testTdf129810::TestBody
greater assertion failed
- Expected greater than: 13
- Actual  : 13
[...]

That test was added with

commit 3548c92453b9d0d85270bc6309a91c4107e49685
Author: Khaled Hosny <khaled at libreoffice.org>
Date:   Fri Jun 23 19:10:49 2023 +0300

     tdf#129810: Compress fullwidth CJK punctuation

     When compressions CJK punctuation, compress also full width versions to
     match Word behaviour.

     Change-Id: Ic35cfcbacca1974b7241d657f078148bac06478e
     Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153530
     Tested-by: Jenkins
     Reviewed-by: خالد حسني <khaled at libreoffice.org>
     (cherry picked from commit 4a92323b54e7d63a8bc0b8e62fdc6b31760dcd05)
     Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153519

This should work around it:

diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index a4d4540ab228..46d262f6f0b8 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -9,6 +9,8 @@

  #include <swmodeltestbase.hxx>

+#include <config_fonts.h>
+
  #include <memory>

  #include <com/sun/star/text/BibliographyDataField.hpp>
@@ -1363,6 +1365,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, 
testParaUpperMarginFlyIntersect)
      CPPUNIT_ASSERT_EQUAL(521, nHeight);
  }

+/* needs Source Han Serif SC*/
+#if HAVE_MORE_FONTS
  CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
  {
      // Load the document, which embeds a CJK font.
@@ -1394,6 +1398,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810)
          }
      }
  }
+#endif

  CPPUNIT_PLUGIN_IMPLEMENT();

(keep the comment or not, don't mind, none of other checks has it but it 
was/is there for my notes and the actual Debian patch file...)

But the root question is here how this ever worked? On your system it 
might be thgere but on the Jenkins nodes?
Since "standard" LibreOffice builds use the stuff downloaded, but 
download.lst neither contains any source fonts (anymore) nor that font 
specifically...

rene at frodo:~/LibreOffice/git/libreoffice-7-6$ grep -i sans download.lst; 
grep -i source download.lst; grep -i han download.lst
# so upgrading to a new version only requires changes in download.lst.
FREEHAND_SHA256SUM := 
0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac
FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz
rene at frodo:~/LibreOffice/git/libreoffice-7-6$

(Theer is a subset of that font in vcl/qa/cppunit/data/tdf107718.otf but 
that is a) a subset b) obviously not used in sws tests)

Regards,

Rene


More information about the LibreOffice mailing list