Repository.mk | 14 +++++++------- config_host.mk.in | 1 + configure.ac | 17 ++++++++++++++++- distro-configs/CPAndroidBranding.conf | 1 + distro-configs/CPLinux-LOKit.conf | 1 + distro-configs/CPLinux.conf | 1 + distro-configs/CPOSX.conf | 1 + distro-configs/CPWin32-MPL.conf | 1 + distro-configs/CPWin32.conf | 1 + distro-configs/CPWin64.conf | 1 + distro-configs/CPiOSBranding.conf | 1 + external/more_fonts/Module_more_fonts.mk | 28 ++++++++++++++-------------- 12 files changed, 46 insertions(+), 22 deletions(-)
New commits: commit 195623eec4ac023d74c75a5ea58db8e94396e316 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Aug 23 22:13:34 2024 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Aug 26 12:37:30 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 <caolan.mcnam...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172374 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/Repository.mk b/Repository.mk index 096d386e2fcf..398e343e3d5e 100644 --- a/Repository.mk +++ b/Repository.mk @@ -1073,13 +1073,13 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo_fonts,\ fonts_reem \ fonts_sourcesans \ 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,) \ ) \ $(call gb_Helper_optional,NOTO_FONT,\ fonts_notomore \ diff --git a/config_host.mk.in b/config_host.mk.in index df9aa13a925e..6d6f1262dc8d 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -751,6 +751,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 07cd71738821..12391204c5a7 100644 --- a/configure.ac +++ b/configure.ac @@ -2188,6 +2188,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_ENABLE(noto-font, AS_HELP_STRING([--enable-noto-font], [Add more Google Noto fonts.]), @@ -13669,18 +13677,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 Test whether to include more Google Noto fonts dnl =================================================================== diff --git a/distro-configs/CPAndroidBranding.conf b/distro-configs/CPAndroidBranding.conf index a95d5e894b57..f4ecf7dc72fc 100644 --- a/distro-configs/CPAndroidBranding.conf +++ b/distro-configs/CPAndroidBranding.conf @@ -9,6 +9,7 @@ --disable-scripting-javascript --with-lang=ar cs da de el en-US es fr hr hu it ja ko nb nl pl pt-BR sk sl sv tr zh-CN zh-TW --with-myspell-dicts +--with-docrepair-fonts --enable-pdfimport --enable-release-build --disable-community-flavor diff --git a/distro-configs/CPLinux-LOKit.conf b/distro-configs/CPLinux-LOKit.conf index d419b47059ff..612a0761a177 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/distro-configs/CPLinux.conf b/distro-configs/CPLinux.conf index 370d564309fb..164655939a27 100644 --- a/distro-configs/CPLinux.conf +++ b/distro-configs/CPLinux.conf @@ -17,6 +17,7 @@ --without-helppack-integration --with-linker-hash-style=both --with-fonts +--with-docrepair-fonts --with-external-thes-dir=/usr/share/mythes --with-external-hyph-dir=/usr/share/hyphen --with-external-dict-dir=/usr/share/hunspell diff --git a/distro-configs/CPOSX.conf b/distro-configs/CPOSX.conf index 7a3d9d13ec5b..e3a8201b9e12 100644 --- a/distro-configs/CPOSX.conf +++ b/distro-configs/CPOSX.conf @@ -4,6 +4,7 @@ --without-junit --without-help --with-myspell-dicts +--with-docrepair-fonts --enable-extension-integration --disable-online-update --disable-odk diff --git a/distro-configs/CPWin32-MPL.conf b/distro-configs/CPWin32-MPL.conf index 055ce2154445..6a0a49b3a5d5 100644 --- a/distro-configs/CPWin32-MPL.conf +++ b/distro-configs/CPWin32-MPL.conf @@ -5,6 +5,7 @@ --with-theme=colibre --without-help --with-myspell-dicts +--with-docrepair-fonts --without-junit --without-helppack-integration --enable-extension-integration diff --git a/distro-configs/CPWin32.conf b/distro-configs/CPWin32.conf index 53b535009be4..ff70cbb42824 100644 --- a/distro-configs/CPWin32.conf +++ b/distro-configs/CPWin32.conf @@ -16,6 +16,7 @@ --enable-release-build --with-help=html --with-myspell-dicts +--with-docrepair-fonts --with-package-format=msi --enable-mergelibs --enable-lto diff --git a/distro-configs/CPWin64.conf b/distro-configs/CPWin64.conf index a6123e0ebb3e..ee46685f2af3 100644 --- a/distro-configs/CPWin64.conf +++ b/distro-configs/CPWin64.conf @@ -17,6 +17,7 @@ --enable-release-build --with-help=html --with-myspell-dicts +--with-docrepair-fonts --with-package-format=msi installed --enable-mergelibs --enable-lto diff --git a/distro-configs/CPiOSBranding.conf b/distro-configs/CPiOSBranding.conf index 547fe4abc28d..347e5b1bf1b5 100644 --- a/distro-configs/CPiOSBranding.conf +++ b/distro-configs/CPiOSBranding.conf @@ -2,4 +2,5 @@ --enable-release-build --enable-symbols --with-myspell-dicts +--with-docrepair-fonts --with-lang=ar bg ca cs da de el en-US en-GB eo es eu fi fr gl he hr hu id is it ja ko lo nb nl oc pl pt pt-BR sq ru sk sl sv tr uk vi zh-CN zh-TW diff --git a/external/more_fonts/Module_more_fonts.mk b/external/more_fonts/Module_more_fonts.mk index 6cc170df8c74..4c19bdc5289b 100644 --- a/external/more_fonts/Module_more_fonts.mk +++ b/external/more_fonts/Module_more_fonts.mk @@ -41,13 +41,13 @@ $(eval $(call gb_Module_add_targets,more_fonts,\ ExternalPackage_scheherazade \ ExternalPackage_opendyslexic \ ExternalPackage_opensans \ - 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 \ @@ -79,13 +79,13 @@ $(eval $(call gb_Module_add_targets,more_fonts,\ UnpackedTarball_scheherazade \ UnpackedTarball_opendyslexic \ UnpackedTarball_opensans \ - 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: