postprocess/CustomTarget_fontconfig.mk  |    3 ++-
 postprocess/fontconfig/fc_local.snippet |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 53cc5b80be9095f3018545e3af98e4acdc6a4f27
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Oct 24 14:18:39 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Oct 25 15:38:07 2025 +0200

    fontconfig config to disable embedded bitmaps for Calibri, Cambria & Monaco
    
    because they look terrible rendered via cairo+freetype.
    
    Change-Id: I03cba65b49c1157075e6665290e0273eb9300603
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192942
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/postprocess/CustomTarget_fontconfig.mk 
b/postprocess/CustomTarget_fontconfig.mk
index 1202aa9740c9..30394710b371 100644
--- a/postprocess/CustomTarget_fontconfig.mk
+++ b/postprocess/CustomTarget_fontconfig.mk
@@ -19,7 +19,7 @@ 
$(gb_CustomTarget_workdir)/postprocess/fontconfig/fc_local.conf: \
     $(SRCDIR)/external/more_fonts/fc_local.snippet
 endif
 
-$(gb_CustomTarget_workdir)/postprocess/fontconfig/fc_local.conf:
+$(gb_CustomTarget_workdir)/postprocess/fontconfig/fc_local.conf: 
$(SRCDIR)/postprocess/fontconfig/fc_local.snippet
        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))
@@ -32,6 +32,7 @@ endif
 ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),)
        cat $(SRCDIR)/external/more_fonts/fc_local.snippet >>$@
 endif
+       cat $(SRCDIR)/postprocess/fontconfig/fc_local.snippet >>$@
        printf '</fontconfig>
' >>$@
 
 # vim: set noet sw=4 ts=4:
diff --git a/postprocess/fontconfig/fc_local.snippet 
b/postprocess/fontconfig/fc_local.snippet
new file mode 100644
index 000000000000..cbdc8718bb89
--- /dev/null
+++ b/postprocess/fontconfig/fc_local.snippet
@@ -0,0 +1,32 @@
+
+<!--
+  Disable embedded bitmaps for Calibri, Cambria & Monaco because
+  they look terrible rendered via cairo+freetype.
+ -->
+
+<match target="font">
+  <test qual="any" name="family">
+    <string>Calibri</string>
+  </test>
+  <edit name="embeddedbitmap">
+    <bool>false</bool>
+  </edit>
+</match>
+
+<match target="font">
+  <test qual="any" name="family">
+    <string>Cambria</string>
+  </test>
+  <edit name="embeddedbitmap">
+    <bool>false</bool>
+  </edit>
+</match>
+
+<match target="font">
+  <test qual="any" name="family">
+    <string>Monaco</string>
+  </test>
+  <edit name="embeddedbitmap">
+    <bool>false</bool>
+  </edit>
+</match>

Reply via email to