summaryrefslogtreecommitdiff
path: root/conf.d
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2019-07-29 09:38:51 +0000
committerAkira TAGOH <akira@tagoh.org>2019-07-29 10:19:26 +0000
commit80047ed8e8b63153ad2014f731453eb47c79c296 (patch)
tree86821089ecf96c513c8d9e61d9354135fc52f793 /conf.d
parentf555f50a207a96689dd6cf8ef96fd7f01b37a952 (diff)
downloadfontconfig-80047ed8e8b63153ad2014f731453eb47c79c296.tar.gz
Add FC_FONT_HAS_HINT property to see if font has hinting or not.
This may helps to enable autohint only when font doesn't have any hinting
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/09-autohint-if-no-hinting.conf20
-rw-r--r--conf.d/Makefile.am1
2 files changed, 21 insertions, 0 deletions
diff --git a/conf.d/09-autohint-if-no-hinting.conf b/conf.d/09-autohint-if-no-hinting.conf
new file mode 100644
index 0000000..afcef3f
--- /dev/null
+++ b/conf.d/09-autohint-if-no-hinting.conf
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+ <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
+ <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
+ </its:rules>
+
+ <description>Enable autohinter if font doesn't have any hinting</description>
+ <!-- Use the Autohinter -->
+ <match target="font">
+ <test name="fonthashint"><bool>false</bool></test>
+ <!--
+ This configuration is available on the major desktop environments.
+ We shouldn't overwrite it with "assign" unconditionally.
+ Most clients may picks up the first value only. so using "append"
+ may simply works to avoid it.
+ -->
+ <edit name="autohint" mode="append"><bool>true</bool></edit>
+ </match>
+</fontconfig>
diff --git a/conf.d/Makefile.am b/conf.d/Makefile.am
index 3bb92dd..710318c 100644
--- a/conf.d/Makefile.am
+++ b/conf.d/Makefile.am
@@ -57,6 +57,7 @@ config_DATA = $(DOC_FILES)
templatedir = $(TEMPLATEDIR)
template_DATA = \
05-reset-dirs-sample.conf \
+ 09-autohint-if-no-hinting.conf \
10-autohint.conf \
10-hinting-full.conf \
10-hinting-medium.conf \