Re: Changing to hintslight globally by default + hintfull for otfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So there is a change of strategy over at FreeType.

Someone thought my attempt to leave all the font rendering configuration to fontconfig is misguided and pointed out that hintslight commonly translates to FT_LOAD_TARGET_LIGHT, which implies what I want to achieve with hintfull for .otfs. So FreeType master changed the meaning of FT_LOAD_TARGET_LIGHT to "Use native Y-only-snapping if driver and font supports it and Y-only autohinter otherwise". This encompasses future additions to the LIGHT mode, e.g. once ClearType is fully supported.

This makes my per-font-format-configuration obsolete to me because this way is much more elegant. You can ignore my posted .confs.

What still stands is my wish to set hintslight as the global default. I saw that Ubuntu ships with several additional confs, I attached the patches from the Ubuntu package. How about upstreaming this? They use 10-antialias.conf, 10-hinting.conf and 10-hinting-slight.conf by default.
>From 5a85212b8d6ae4c01edd5ec417bf29413e7ba33a Mon Sep 17 00:00:00 2001
From: Nikolaus Waxweiler <madigens@xxxxxxxxx>
Date: Fri, 13 Nov 2015 15:22:46 +0100
Subject: [PATCH] Add slight hinting config from Ubuntu and make it the
 default.

---
 conf.d/10-antialias.conf      | 8 ++++++++
 conf.d/10-hinting-full.conf   | 8 ++++++++
 conf.d/10-hinting-medium.conf | 8 ++++++++
 conf.d/10-hinting-slight.conf | 8 ++++++++
 conf.d/10-hinting.conf        | 8 ++++++++
 conf.d/Makefile.am            | 8 ++++++++
 6 files changed, 48 insertions(+)
 create mode 100644 conf.d/10-antialias.conf
 create mode 100644 conf.d/10-hinting-full.conf
 create mode 100644 conf.d/10-hinting-medium.conf
 create mode 100644 conf.d/10-hinting-slight.conf
 create mode 100644 conf.d/10-hinting.conf

diff --git a/conf.d/10-antialias.conf b/conf.d/10-antialias.conf
new file mode 100644
index 0000000..62d6407
--- /dev/null
+++ b/conf.d/10-antialias.conf
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+<!--  Use the Antialiasing -->
+  <match target="font">
+    <edit name="antialias" mode="assign"><bool>true</bool></edit>
+  </match>
+</fontconfig>
diff --git a/conf.d/10-hinting-full.conf b/conf.d/10-hinting-full.conf
new file mode 100644
index 0000000..e052031
--- /dev/null
+++ b/conf.d/10-hinting-full.conf
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+<!--  Use Full Hinting -->
+  <match target="font">
+    <edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
+  </match>
+</fontconfig>
diff --git a/conf.d/10-hinting-medium.conf b/conf.d/10-hinting-medium.conf
new file mode 100644
index 0000000..3ae3546
--- /dev/null
+++ b/conf.d/10-hinting-medium.conf
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+<!--  Use Medium Hinting -->
+  <match target="font">
+    <edit name="hintstyle" mode="assign"><const>hintmedium</const></edit>
+  </match>
+</fontconfig>
diff --git a/conf.d/10-hinting-slight.conf b/conf.d/10-hinting-slight.conf
new file mode 100644
index 0000000..2073d96
--- /dev/null
+++ b/conf.d/10-hinting-slight.conf
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+<!--  Use Slight Hinting -->
+  <match target="font">
+    <edit name="hintstyle" mode="assign"><const>hintslight</const></edit>
+  </match>
+</fontconfig>
diff --git a/conf.d/10-hinting.conf b/conf.d/10-hinting.conf
new file mode 100644
index 0000000..2d320b2
--- /dev/null
+++ b/conf.d/10-hinting.conf
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+<!--  Use Hinting -->
+  <match target="font">
+    <edit name="hinting" mode="assign"><bool>true</bool></edit>
+  </match>
+</fontconfig>
diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am
index d61756b..cb2fe43 100644
--- a/conf.d/Makefile.am
+++ b/conf.d/Makefile.am
@@ -26,6 +26,9 @@ DOC_SOURCES = README.in
 DOC_FILES = $(DOC_SOURCES:.in=)
 
 CONF_LINKS = \
+	10-antialias.conf \
+	10-hinting.conf \
+	10-hinting-slight.conf \
 	10-scale-bitmap-fonts.conf \
 	20-unhint-small-vera.conf \
 	30-urw-aliases.conf \
@@ -50,7 +53,12 @@ config_DATA = $(DOC_FILES)
 
 templatedir = $(TEMPLATEDIR)
 template_DATA =				\
+	10-antialias.conf		\
 	10-autohint.conf		\
+	10-hinting.conf		\
+	10-hinting-full.conf		\
+	10-hinting-medium.conf		\
+	10-hinting-slight.conf		\
 	10-no-sub-pixel.conf		\
 	10-scale-bitmap-fonts.conf	\
 	10-sub-pixel-bgr.conf		\
-- 
2.5.0

_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux