extras/source/truetype/symbol/fc_10-antialias.snippet         |    6 ++++++
 extras/source/truetype/symbol/fc_10-hinting-style.snippet     |    6 ++++++
 extras/source/truetype/symbol/fc_10-hinting.snippet           |    6 ++++++
 extras/source/truetype/symbol/fc_10-no-autohint.snippet       |    6 ++++++
 extras/source/truetype/symbol/fc_11-lcdfilter-default.snippet |    6 ++++++
 postprocess/CustomTarget_fontconfig.mk                        |    7 +++++++
 vcl/inc/qt5/QtInstance.hxx                                    |    3 +++
 vcl/qt5/QtInstance.cxx                                        |    6 ++++++
 8 files changed, 46 insertions(+)

New commits:
commit fb014c0d343b8071e6cf6475126663108e01a148
Author:     Balazs Varga <balazs.varga.ext...@allotropia.de>
AuthorDate: Tue Mar 4 09:55:12 2025 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Wed Mar 5 08:06:54 2025 +0100

    Add extra font config options for emscripten wasm build
    
    In case of wasm build we can have missing default font config
    options compared to Linux or other builds. These options are
    necessary for the FontConfig lib.
    
    Change-Id: I3e04847f28bdbd28c767793bf5cb4061b7b3a251
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182462
    Tested-by: Jenkins
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>
    (cherry picked from commit ac5c93bfbefb18130eb0f1371fdacca0909cc16a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182502
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: allotropia jenkins <jenk...@allotropia.de>

diff --git a/extras/source/truetype/symbol/fc_10-antialias.snippet 
b/extras/source/truetype/symbol/fc_10-antialias.snippet
new file mode 100644
index 000000000000..1097a25a356c
--- /dev/null
+++ b/extras/source/truetype/symbol/fc_10-antialias.snippet
@@ -0,0 +1,6 @@
+<!--  Use the Antialiasing -->
+<match target="pattern">
+  <edit name="antialias" mode="assign">
+    <bool>true</bool>
+  </edit>
+</match>
diff --git a/extras/source/truetype/symbol/fc_10-hinting-style.snippet 
b/extras/source/truetype/symbol/fc_10-hinting-style.snippet
new file mode 100644
index 000000000000..4a39ee65e3cf
--- /dev/null
+++ b/extras/source/truetype/symbol/fc_10-hinting-style.snippet
@@ -0,0 +1,6 @@
+<!--  Use Slight Hinting -->
+<match target="pattern">
+  <edit name="hintstyle" mode="assign">
+    <const>hintslight</const>
+  </edit>
+</match>
diff --git a/extras/source/truetype/symbol/fc_10-hinting.snippet 
b/extras/source/truetype/symbol/fc_10-hinting.snippet
new file mode 100644
index 000000000000..ae439df302f0
--- /dev/null
+++ b/extras/source/truetype/symbol/fc_10-hinting.snippet
@@ -0,0 +1,6 @@
+<!--  Use Hinting -->
+<match target="pattern">
+  <edit name="hinting" mode="assign">
+    <bool>true</bool>
+  </edit>
+</match>
diff --git a/extras/source/truetype/symbol/fc_10-no-autohint.snippet 
b/extras/source/truetype/symbol/fc_10-no-autohint.snippet
new file mode 100644
index 000000000000..9ce18e44e44a
--- /dev/null
+++ b/extras/source/truetype/symbol/fc_10-no-autohint.snippet
@@ -0,0 +1,6 @@
+<!--  Use Auto Hinting -->
+<match target="pattern">
+  <edit name="autohint" mode="assign">
+    <bool>false</bool>
+  </edit>
+</match>
diff --git a/extras/source/truetype/symbol/fc_11-lcdfilter-default.snippet 
b/extras/source/truetype/symbol/fc_11-lcdfilter-default.snippet
new file mode 100644
index 000000000000..d90d8c09f3c7
--- /dev/null
+++ b/extras/source/truetype/symbol/fc_11-lcdfilter-default.snippet
@@ -0,0 +1,6 @@
+<!--  Use lcddefault as default for LCD filter -->
+<match target="pattern">
+  <edit name="lcdfilter" mode="assign">
+    <const>lcddefault</const>
+  </edit>
+</match>
diff --git a/postprocess/CustomTarget_fontconfig.mk 
b/postprocess/CustomTarget_fontconfig.mk
index decc71f82cef..1202aa9740c9 100644
--- a/postprocess/CustomTarget_fontconfig.mk
+++ b/postprocess/CustomTarget_fontconfig.mk
@@ -22,6 +22,13 @@ endif
 $(gb_CustomTarget_workdir)/postprocess/fontconfig/fc_local.conf:
        printf '<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "/etc/fonts/conf.d/fonts.dtd">
<fontconfig>
' >$@
        cat $(SRCDIR)/extras/source/truetype/symbol/fc_local.snippet >>$@
+ifeq (EMSCRIPTEN,$(OS))
+       cat $(SRCDIR)/extras/source/truetype/symbol/fc_10-antialias.snippet >>$@
+       cat $(SRCDIR)/extras/source/truetype/symbol/fc_10-hinting.snippet >>$@
+       cat $(SRCDIR)/extras/source/truetype/symbol/fc_10-hinting-style.snippet 
>>$@
+       cat $(SRCDIR)/extras/source/truetype/symbol/fc_10-no-autohint.snippet 
>>$@
+       cat 
$(SRCDIR)/extras/source/truetype/symbol/fc_11-lcdfilter-default.snippet >>$@
+endif
 ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),)
        cat $(SRCDIR)/external/more_fonts/fc_local.snippet >>$@
 endif
diff --git a/vcl/inc/qt5/QtInstance.hxx b/vcl/inc/qt5/QtInstance.hxx
index 2073c8ac05d8..71386df0aa4a 100644
--- a/vcl/inc/qt5/QtInstance.hxx
+++ b/vcl/inc/qt5/QtInstance.hxx
@@ -174,6 +174,9 @@ public:
     virtual css::uno::Reference<css::uno::XInterface>
     ImplCreateDropTarget(const SystemEnvData*) override;
 
+    // for qt font options
+    virtual const cairo_font_options_t* GetCairoFontOptions() override;
+
     // whether to reduce animations; KFSalInstance overrides this to read 
Plasma settings
     virtual bool GetUseReducedAnimation() { return false; }
     void UpdateStyle(bool bFontsChanged);
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 2fecefcfbfb3..78a070f8f107 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -561,6 +561,12 @@ QtInstance::ImplCreateDropTarget(const SystemEnvData* 
pSysEnv)
     return vcl::X11DnDHelper(new QtDropTarget(), pSysEnv->aShellWindow);
 }
 
+const cairo_font_options_t* QtInstance::GetCairoFontOptions()
+{
+    static cairo_font_options_t* gOptions = cairo_font_options_create();
+    return gOptions;
+}
+
 IMPL_LINK_NOARG(QtInstance, updateStyleHdl, Timer*, void)
 {
     SolarMutexGuard aGuard;

Reply via email to