summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2015-09-02 20:22:39 -0400
committerChris Severance2015-09-02 20:22:39 -0400
commit81dd7bfbd1fac3f6157019e9206db4466b690771 (patch)
tree86b082e174d986a28d69c9968b6706519868b511
parent8ae52f0caa71554a741abad002970272aae0c7e0 (diff)
downloadaur-81dd7bfbd1fac3f6157019e9206db4466b690771.tar.gz
Latin font subsitutions
-rw-r--r--.SRCINFO2
-rw-r--r--20-ttf-win7-fonts-latin.conf40
-rw-r--r--PKGBUILD30
3 files changed, 57 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c3ed7dd9c66e..99454ff0ae21 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -23,6 +23,7 @@ pkgbase = ttf-win7-fonts
conflicts = ttf-win7-fonts-autodownload
source = license.rtf
source = FONTVER.pl
+ source = 20-ttf-win7-fonts-latin.conf
source = 20-ttf-win7-fonts-japanese.conf
source = 20-ttf-win7-fonts-korean.conf
source = 20-ttf-win7-fonts-zh_cn.conf
@@ -30,6 +31,7 @@ pkgbase = ttf-win7-fonts
source = http://downloads.sourceforge.net/corefonts/andale32.exe
sha256sums = 096cdd18e26b2b3d8cf0b3ec6a1ffb5b0eaae0fcc2105e3c145f19037a42d467
sha256sums = 32d534a6f469c8fc5613fcc5cc0934670da470036a94aa21c6f73c2a0f1ab19e
+ sha256sums = 4c46d930ac139018dff8d00695950251fb5b4306f38a625f0d3ac20b9f3c08e4
sha256sums = d35adbff8bbc8829cd84478b0fe16c78b9930f56c0c4b007f68fb27ada6fa700
sha256sums = 3953ca5d604a1f3f6dd5d0ab0b13fa06c19d1de48b0c9e871e89e6c4b20cebcf
sha256sums = 700aad3b80067389ba6921bd16c9ebcda152e685330e113c38f1e06a84000619
diff --git a/20-ttf-win7-fonts-latin.conf b/20-ttf-win7-fonts-latin.conf
new file mode 100644
index 000000000000..ecfd86dd8e46
--- /dev/null
+++ b/20-ttf-win7-fonts-latin.conf
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!-- /etc/fonts/fonts.conf file to configure system font access -->
+<!-- http://superuser.com/questions/54216/how-to-get-firefox-to-use-ms-truetype-fonts-for-helvetica-times-etc -->
+<fontconfig>
+ <!-- Font directory list -->
+ <dir>/usr/local/winfonts</dir>
+
+ <!-- Replace Helvetica with Arial -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Helvetica</string>
+ </test>
+ <edit name="family" mode="assign" binding="strong">
+ <string>Arial</string>
+ </edit>
+ </match>
+
+ <!-- Replace Times with Times New Roman -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Times</string>
+ </test>
+ <edit name="family" mode="assign" binding="strong">
+ <string>Times New Roman</string>
+ </edit>
+ </match>
+
+ <!-- Replace Palatino with Georgia -->
+ <match target="pattern">
+ <test qual="any" name="family">
+ <string>Palatino</string>
+ </test>
+ <edit name="family" mode="assign" binding="strong">
+ <string>Georgia</string>
+ </edit>
+ </match>
+
+</fontconfig>
+
diff --git a/PKGBUILD b/PKGBUILD
index cb44eb72b474..2a4f2ac7b087 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -175,18 +175,14 @@ optdepends=('ttf-office-2007-fonts')
provides=('ttf-font' 'ttf-ms-fonts' 'ttf-tahoma' 'ttf-vista-fonts')
conflicts=('ttf-ms-fonts' 'ttf-tahoma' 'ttf-vista-fonts' 'ttf-ms-win8' 'ttf-win7-fonts-autodownload')
install="${pkgbase}.install"
-source=('license.rtf' 'FONTVER.pl'
-'20-ttf-win7-fonts-japanese.conf'
-'20-ttf-win7-fonts-korean.conf'
-'20-ttf-win7-fonts-zh_cn.conf'
-'20-ttf-win7-fonts-zh_tw.conf'
-)
+source=('license.rtf' 'FONTVER.pl' "20-${_pkgbase}-"{latin,japanese,korean,zh_cn,zh_tw}'.conf')
_sfpath="http://downloads.sourceforge.net/corefonts"
source+=("${_sfpath}/andale32.exe") # "${_sfpath}/arialb32.exe")
_fnts_latinsf=('AndaleMo.TTF') # 'AriBlk.TTF') # Windows Arial Black seems to work now.
# Andale is not in Windows 7 without which we can't be a replacement for ttf-ms-fonts.
sha256sums=('096cdd18e26b2b3d8cf0b3ec6a1ffb5b0eaae0fcc2105e3c145f19037a42d467'
'32d534a6f469c8fc5613fcc5cc0934670da470036a94aa21c6f73c2a0f1ab19e'
+ '4c46d930ac139018dff8d00695950251fb5b4306f38a625f0d3ac20b9f3c08e4'
'd35adbff8bbc8829cd84478b0fe16c78b9930f56c0c4b007f68fb27ada6fa700'
'3953ca5d604a1f3f6dd5d0ab0b13fa06c19d1de48b0c9e871e89e6c4b20cebcf'
'700aad3b80067389ba6921bd16c9ebcda152e685330e113c38f1e06a84000619'
@@ -1219,7 +1215,8 @@ build() {
set +u
}
-# This is the package function for Latin only or Latin+Intl in one package
+# This package function is only used by font packages that do not have a pkgbase like ttf-office-2007.
+# It is not used by split packages ttf-win7-fonts or ttf-ms-win8.
package() {
set -u
cd "${srcdir}"
@@ -1313,27 +1310,30 @@ function _package {
fi
fi
- # Prepare destination directory
- install -dm755 "${pkgdir}/usr/share/fonts/TTF"
-
# Install fonts
for _fnt in "${_fontsout[@]}"; do
if [ ! -z "${_fnt}" ]; then
- install -pm644 "${_fnt}" "${pkgdir}/usr/share/fonts/TTF/${_fnt,,}" || :
+ install -Dpm644 "${_fnt}" "${pkgdir}/usr/share/fonts/TTF/${_fnt,,}" || :
fi
done
+ # according to /etc/fonts/conf.d/README these are numbered 20 to come before 30 through 39 family substitution
if [ "$1" = 'all' ]; then
local _conf
- for _conf in 20-${_pkgbase}-*.conf; do
+ for _conf in "20-${_pkgbase}"-*.conf; do
backup+=("etc/fonts/conf.avail/${_conf}")
install -Dpm644 -t "${pkgdir}/etc/fonts/conf.avail" "${_conf}"
+ install -d "${pkgdir}/etc/fonts/conf.d"
+ ln -sf "/etc/fonts/conf.avail/${_conf}" "${pkgdir}/etc/fonts/conf.d/${_conf}"
done
else
# Install available fontconfig fix.
- if [ -e "20-${_pkgbase}-$1.conf" ]; then
- backup=("etc/fonts/conf.avail/20-${_pkgbase}-$1.conf")
- install -Dpm644 -t "${pkgdir}/etc/fonts/conf.avail" "20-${_pkgbase}-$1.conf"
+ local _conf="20-${_pkgbase}-$1.conf"
+ if [ -e "${_conf}" ]; then
+ backup=("etc/fonts/conf.avail/${_conf}")
+ install -Dpm644 -t "${pkgdir}/etc/fonts/conf.avail" "${_conf}"
+ install -d "${pkgdir}/etc/fonts/conf.d"
+ ln -sf "/etc/fonts/conf.avail/${_conf}" "${pkgdir}/etc/fonts/conf.d/${_conf}"
fi
fi