From 9d49c635fed3533d54fcd31742fa86db16db8a42 Mon Sep 17 00:00:00 2001 From: andry-dev Date: Tue, 23 Mar 2021 22:45:50 +0100 Subject: [PATCH 1/2] freetype: move ClearType patch to a build option --- .../freetype/patches/enable-subpixel-rendering.patch | 11 ----------- srcpkgs/freetype/template | 6 ++++++ 2 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 srcpkgs/freetype/patches/enable-subpixel-rendering.patch diff --git a/srcpkgs/freetype/patches/enable-subpixel-rendering.patch b/srcpkgs/freetype/patches/enable-subpixel-rendering.patch deleted file mode 100644 index 5cba955ca2cf..000000000000 --- a/srcpkgs/freetype/patches/enable-subpixel-rendering.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- include/freetype/config/ftoption.h -+++ include/freetype/config/ftoption.h -@@ -126,7 +126,7 @@ - * macro is not defined, FreeType offers alternative LCD rendering - * technology that produces excellent output without LCD filtering. - */ --/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ -+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - - /************************************************************************** diff --git a/srcpkgs/freetype/template b/srcpkgs/freetype/template index ba4c6ad900c4..f327fcab8466 100644 --- a/srcpkgs/freetype/template +++ b/srcpkgs/freetype/template @@ -12,9 +12,15 @@ license="GPL-2.0-or-later, FTL" homepage="https://www.freetype.org/" distfiles="${NONGNU_SITE}/${pkgname}/${pkgname}-${version}.tar.xz" checksum=86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784 +build_options="cleartype" +desc_option_cleartype="Enable subpixel rendering similar to ClearType" +build_options_default="cleartype" post_patch() { vsed -i -e "s/%PKG_CONFIG%/pkg-config/" builds/unix/freetype-config.in + if [ "$build_option_cleartype" ]; then + vsed -i include/freetype/config/ftoption.h -e 's@/\* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING \*/@#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING@' + fi } post_install() { From 4df21cf586c5742c194f5a588e8e3677b75899d6 Mon Sep 17 00:00:00 2001 From: andry-dev Date: Tue, 23 Mar 2021 22:42:51 +0100 Subject: [PATCH 2/2] fontconfig: set lcdfilter by default --- srcpkgs/fontconfig/INSTALL | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/srcpkgs/fontconfig/INSTALL b/srcpkgs/fontconfig/INSTALL index 1daa9b2a8f57..bf97a39b732a 100644 --- a/srcpkgs/fontconfig/INSTALL +++ b/srcpkgs/fontconfig/INSTALL @@ -5,6 +5,10 @@ case "${ACTION}" in pre) ;; post) + if [ "$UPDATE" = "no" ]; then + ln -s /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/ + fi + echo "Building fonts cache... " fc-cache -f >/dev/null echo "done."