Repository.mk                            |   14 +++++++-------
 config_host.mk.in                        |    1 +
 configure.ac                             |   18 ++++++++++++++++--
 distro-configs/CPAndroidBranding.conf    |    1 +
 distro-configs/CPLinux-LOKit.conf        |    1 +
 external/more_fonts/Module_more_fonts.mk |   28 ++++++++++++++--------------
 6 files changed, 40 insertions(+), 23 deletions(-)

New commits:
commit cd8ad433f04223193d270ba583ffa881984acf11
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Aug 23 22:13:34 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sun Aug 25 21:45:06 2024 +0200

    tdf#161941 add --with-docrepair-fonts option
    
    to enabling bundling or not bundling the docrepair fonts of
    https://github.com/docrepair-fonts
    
    (which provide replacments for: Agency FB, Baskerville Old Face,
    Berlin Sans FB, Cooper Black, Lucida Calligraphy, Lucida Grande,
    Lucida Handwriting)
    
    Change-Id: I4ea442fa54d21f213ccbdccba9aea1b9c0675c90
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172337
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/Repository.mk b/Repository.mk
index 6ef9293061f4..693a47b09a4e 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1084,13 +1084,13 @@ $(eval $(call 
gb_Helper_register_packages_for_install,ooo_fonts,\
                fonts_noto_serif_lao \
                fonts_reem \
                fonts_scheherazade \
-               fonts_agdasima \
-               fonts_bacasime_antique \
-               fonts_belanosima \
-               fonts_caprasimo \
-               fonts_lugrasimo \
-               fonts_lumanosimo \
-               fonts_lunasima \
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_agdasima,) \
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_bacasime_antique,) 
\
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_belanosima,) \
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_caprasimo,) \
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_lugrasimo,) \
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_lumanosimo,) \
+               $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_lunasima,) \
        ) \
 ))
 
diff --git a/config_host.mk.in b/config_host.mk.in
index 810abab5f4ca..315642b8dd35 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -762,6 +762,7 @@ export WITH_COREDUMPCTL=@WITH_COREDUMPCTL@
 export WITH_EXTENSION_INTEGRATION=@WITH_EXTENSION_INTEGRATION@
 export WITH_EXTRA_EXTENSIONS=@WITH_EXTRA_EXTENSIONS@
 export WITH_FONTS=@WITH_FONTS@
+export WITH_DOCREPAIR_FONTS=@WITH_DOCREPAIR_FONTS@
 export WITH_GALLERY_BUILD=@WITH_GALLERY_BUILD@
 export WITH_TEMPLATES=@WITH_TEMPLATES@
 export WITH_GSSAPI=@WITH_GSSAPI@
diff --git a/configure.ac b/configure.ac
index f0fb5765abc9..7e1f8a3d0e37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2275,6 +2275,14 @@ libo_FUZZ_ARG_WITH(fonts,
          known to be available on the system then you should use this 
option.]),
 ,)
 
+libo_FUZZ_ARG_WITH(docrepair-fonts,
+    AS_HELP_STRING([--with-docrepair-fonts],
+        [LibreOffice optionally includes fonts from 'The DocRepair Project' 
that
+         provide metrically equivalent fallback fonts for a variety of common 
fonts
+         seen in Office Open XML documents. See 
https://github.com/docrepair-fonts
+         for more details. This option has no effect when --without-fonts is 
used.]),
+,)
+
 AC_ARG_WITH(epm,
     AS_HELP_STRING([--with-epm],
         [Decides which epm to use. Default is to use the one from the system if
@@ -13948,19 +13956,25 @@ AC_SUBST(FONTFORGE)
 dnl ===================================================================
 dnl Test whether to include fonts
 dnl ===================================================================
+WITH_FONTS=
+WITH_DOCREPAIR_FONTS=
 AC_MSG_CHECKING([whether to include third-party fonts])
 if test "$with_fonts" != "no"; then
     AC_MSG_RESULT([yes])
     WITH_FONTS=TRUE
     BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
     AC_DEFINE(HAVE_MORE_FONTS)
+    AC_MSG_CHECKING([whether to include 'docrepair' fonts])
+    if test "$with_docrepair_fonts" = "yes"; then
+        AC_MSG_RESULT([yes])
+        WITH_DOCREPAIR_FONTS=TRUE
+    fi
 else
     AC_MSG_RESULT([no])
-    WITH_FONTS=
     SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
 fi
 AC_SUBST(WITH_FONTS)
-
+AC_SUBST(WITH_DOCREPAIR_FONTS)
 
 dnl ===================================================================
 dnl Test whether to enable online update service
diff --git a/distro-configs/CPAndroidBranding.conf 
b/distro-configs/CPAndroidBranding.conf
index 3200e3c5ebe4..30c902df24d3 100644
--- a/distro-configs/CPAndroidBranding.conf
+++ b/distro-configs/CPAndroidBranding.conf
@@ -9,5 +9,6 @@
 --disable-scripting-javascript
 --with-lang=de en-US es pt-BR
 --with-myspell-dicts
+--with-docrepair-fonts
 --enable-pdfimport
 --enable-release-build
diff --git a/distro-configs/CPLinux-LOKit.conf 
b/distro-configs/CPLinux-LOKit.conf
index 0d879e5c99ae..6533a63bcdb3 100644
--- a/distro-configs/CPLinux-LOKit.conf
+++ b/distro-configs/CPLinux-LOKit.conf
@@ -28,6 +28,7 @@
 --without-help
 --with-linker-hash-style=both
 --with-fonts
+--with-docrepair-fonts
 #--enable-noto-font
 --with-galleries=no
 --with-theme=colibre colibre_svg
diff --git a/external/more_fonts/Module_more_fonts.mk 
b/external/more_fonts/Module_more_fonts.mk
index 199fc6cf9622..cb9cd075d728 100644
--- a/external/more_fonts/Module_more_fonts.mk
+++ b/external/more_fonts/Module_more_fonts.mk
@@ -37,13 +37,13 @@ $(eval $(call gb_Module_add_targets,more_fonts,\
        ExternalPackage_noto_serif_lao \
        ExternalPackage_reem \
        ExternalPackage_scheherazade \
-       ExternalPackage_agdasima \
-       ExternalPackage_bacasime_antique \
-       ExternalPackage_belanosima \
-       ExternalPackage_caprasimo \
-       ExternalPackage_lugrasimo \
-       ExternalPackage_lumanosimo \
-       ExternalPackage_lunasima \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_agdasima,) \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_bacasime_antique,) \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_belanosima,) \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_caprasimo,) \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_lugrasimo,) \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_lumanosimo,) \
+       $(if $(WITH_DOCREPAIR_FONTS),ExternalPackage_lunasima,) \
        UnpackedTarball_alef \
        UnpackedTarball_amiri \
        UnpackedTarball_caladea \
@@ -71,13 +71,13 @@ $(eval $(call gb_Module_add_targets,more_fonts,\
        UnpackedTarball_noto_serif_lao \
        UnpackedTarball_reem \
        UnpackedTarball_scheherazade \
-       UnpackedTarball_agdasima \
-       UnpackedTarball_bacasime_antique \
-       UnpackedTarball_belanosima \
-       UnpackedTarball_caprasimo \
-       UnpackedTarball_lugrasimo \
-       UnpackedTarball_lumanosimo \
-       UnpackedTarball_lunasima \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_agdasima,) \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_bacasime_antique,) \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_belanosima,) \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_caprasimo,) \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_lugrasimo,) \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_lumanosimo,) \
+       $(if $(WITH_DOCREPAIR_FONTS),UnpackedTarball_lunasima,) \
 ))
 
 # vim: set noet sw=4 ts=4:

Reply via email to