mirror of
https://github.com/archlinux-jerry/pkgbuilds
synced 2024-11-22 05:50:40 +08:00
add package: ttf-dejavu-emojiless
This commit is contained in:
parent
179276fb95
commit
dc6e46f15c
4 changed files with 167 additions and 0 deletions
51
ttf-dejavu-emojiless/PKGBUILD
Normal file
51
ttf-dejavu-emojiless/PKGBUILD
Normal file
|
@ -0,0 +1,51 @@
|
|||
# $Id$
|
||||
# Maintainer:
|
||||
# Contributor: 😂👌
|
||||
|
||||
pkgname=ttf-dejavu-emojiless
|
||||
pkgver=2.37
|
||||
pkgrel=2
|
||||
pkgdesc="Derivate of DejaVu without characters listed as emoji, in order not to override color fonts"
|
||||
arch=('any')
|
||||
url="https://dejavu-fonts.github.io/"
|
||||
license=('custom')
|
||||
depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-mkfontscale' 'xorg-mkfontdir')
|
||||
makedepends=('fontforge')
|
||||
provides=('ttf-font' 'ttf-dejavu')
|
||||
conflicts=('ttf-dejavu')
|
||||
source=(https://downloads.sourceforge.net/project/dejavu/dejavu/${pkgver}/dejavu-fonts-ttf-${pkgver}.tar.bz2
|
||||
remove-generic-name-assignment-and-aliasing.patch
|
||||
https://github.com/iamcal/emoji-data/raw/master/emoji.json
|
||||
cleaner.py)
|
||||
sha256sums=('fa9ca4d13871dd122f61258a80d01751d603b4d3ee14095d65453b4e846e17d7'
|
||||
'21d85a4f6ea7856074a4eb5c5fce6a10e764d11ff4336e92c4f009815efebb0c'
|
||||
'SKIP'
|
||||
'415ba5000c5dbaf15b56d91d137a60ee257b5ef31c17cb2fd54ed015220b1f8c')
|
||||
|
||||
prepare() {
|
||||
cd dejavu-fonts-ttf-$pkgver
|
||||
patch -Np1 -i ../remove-generic-name-assignment-and-aliasing.patch
|
||||
cd "${srcdir}"
|
||||
ttfdir="${srcdir}"/dejavu-fonts-ttf-${pkgver}/ttf
|
||||
for ttf in "${ttfdir}"/*.ttf; do
|
||||
fontforge -script cleaner.py $ttf
|
||||
done
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm755 "${pkgdir}"/etc/fonts/conf.avail
|
||||
install -dm755 "${pkgdir}"/etc/fonts/conf.d
|
||||
install -dm755 "${pkgdir}"/usr/share/fonts/TTF
|
||||
|
||||
cd "${srcdir}"/dejavu-fonts-ttf-${pkgver}
|
||||
install -m644 ttf/*.ttf "${pkgdir}"/usr/share/fonts/TTF/
|
||||
install -m644 fontconfig/*.conf "${pkgdir}"/etc/fonts/conf.avail/
|
||||
|
||||
pushd "${pkgdir}"/etc/fonts/conf.avail
|
||||
for config in *; do
|
||||
ln -sf ../conf.avail/${config} ../conf.d/${config}
|
||||
done
|
||||
popd
|
||||
|
||||
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
||||
}
|
4
ttf-dejavu-emojiless/autobuild.yaml
Normal file
4
ttf-dejavu-emojiless/autobuild.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
type:
|
||||
auto
|
||||
priority:
|
||||
10
|
10
ttf-dejavu-emojiless/cleaner.py
Executable file
10
ttf-dejavu-emojiless/cleaner.py
Executable file
|
@ -0,0 +1,10 @@
|
|||
from json import load
|
||||
from sys import argv
|
||||
|
||||
ttf = fontforge.open(argv[1])
|
||||
for emoji in load(open('emoji.json')):
|
||||
try:
|
||||
ttf.removeGlyph(int(emoji['unified'], 16))
|
||||
except ValueError:
|
||||
pass
|
||||
ttf.generate(argv[1])
|
|
@ -0,0 +1,102 @@
|
|||
From d9ee532b4f0a879372bdb006ac85d7807629ea98 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Greffrath <fabian@greffrath.com>
|
||||
Date: Mon, 15 May 2017 21:08:12 +0200
|
||||
Subject: [PATCH] fontconfig: remove generic name assignment and aliasing
|
||||
|
||||
This removes the generic name assignment and the generic name aliasing
|
||||
rules for the three standard DejaVu Sans, Sans-Mono and Serif fonts.
|
||||
|
||||
These rules are redundant as they are already in the fontconfig
|
||||
upstream config files 45-latin.conf and 60-latin.conf, respectively,
|
||||
for at least 10 years now, c.f.:
|
||||
|
||||
https://cgit.freedesktop.org/fontconfig/commit/conf.d/45-latin.conf?id=4b51f173c99152586db26b03752873a4b4020672
|
||||
https://cgit.freedesktop.org/fontconfig/commit/conf.d/60-latin.conf?id=6c5619a08575943f75d2341e1a4931ec5faf716b
|
||||
|
||||
We have a bug report in Debian from a user who complains that he
|
||||
changed the preference for the default sans-serif font in the expected
|
||||
rule, i.e. 60-latin.conf, and was confused when his change was
|
||||
overridden by fonts-dejavu's own rule in 57-dejavu-sans.conf:
|
||||
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753401
|
||||
|
||||
The reporter confirms that removing the offending lines from the
|
||||
config files in the fonts-dejavu package causes the intended changes
|
||||
applied to the 60-latin.conf file to take effect.
|
||||
|
||||
Thanks for considering!
|
||||
---
|
||||
fontconfig/57-dejavu-sans-mono.conf | 14 --------------
|
||||
fontconfig/57-dejavu-sans.conf | 14 --------------
|
||||
fontconfig/57-dejavu-serif.conf | 14 --------------
|
||||
3 files changed, 42 deletions(-)
|
||||
|
||||
diff --git a/fontconfig/57-dejavu-sans-mono.conf b/fontconfig/57-dejavu-sans-mono.conf
|
||||
index cc42561e..2c75b5cf 100644
|
||||
--- a/fontconfig/57-dejavu-sans-mono.conf
|
||||
+++ b/fontconfig/57-dejavu-sans-mono.conf
|
||||
@@ -45,18 +45,4 @@
|
||||
<family>DejaVu Sans Mono</family>
|
||||
</accept>
|
||||
</alias>
|
||||
- <!-- Generic name assignment -->
|
||||
- <alias>
|
||||
- <family>DejaVu Sans Mono</family>
|
||||
- <default>
|
||||
- <family>monospace</family>
|
||||
- </default>
|
||||
- </alias>
|
||||
- <!-- Generic name aliasing -->
|
||||
- <alias>
|
||||
- <family>monospace</family>
|
||||
- <prefer>
|
||||
- <family>DejaVu Sans Mono</family>
|
||||
- </prefer>
|
||||
- </alias>
|
||||
</fontconfig>
|
||||
diff --git a/fontconfig/57-dejavu-sans.conf b/fontconfig/57-dejavu-sans.conf
|
||||
index 565cab5f..cff7a842 100644
|
||||
--- a/fontconfig/57-dejavu-sans.conf
|
||||
+++ b/fontconfig/57-dejavu-sans.conf
|
||||
@@ -70,18 +70,4 @@
|
||||
<family>DejaVu Sans</family>
|
||||
</accept>
|
||||
</alias>
|
||||
- <!-- Generic name assignment -->
|
||||
- <alias>
|
||||
- <family>DejaVu Sans</family>
|
||||
- <default>
|
||||
- <family>sans-serif</family>
|
||||
- </default>
|
||||
- </alias>
|
||||
- <!-- Generic name aliasing -->
|
||||
- <alias>
|
||||
- <family>sans-serif</family>
|
||||
- <prefer>
|
||||
- <family>DejaVu Sans</family>
|
||||
- </prefer>
|
||||
- </alias>
|
||||
</fontconfig>
|
||||
diff --git a/fontconfig/57-dejavu-serif.conf b/fontconfig/57-dejavu-serif.conf
|
||||
index a922e9b2..10ae70fd 100644
|
||||
--- a/fontconfig/57-dejavu-serif.conf
|
||||
+++ b/fontconfig/57-dejavu-serif.conf
|
||||
@@ -52,18 +52,4 @@
|
||||
<family>DejaVu Serif</family>
|
||||
</accept>
|
||||
</alias>
|
||||
- <!-- Generic name assignment -->
|
||||
- <alias>
|
||||
- <family>DejaVu Serif</family>
|
||||
- <default>
|
||||
- <family>serif</family>
|
||||
- </default>
|
||||
- </alias>
|
||||
- <!-- Generic name aliasing -->
|
||||
- <alias>
|
||||
- <family>serif</family>
|
||||
- <prefer>
|
||||
- <family>DejaVu Serif</family>
|
||||
- </prefer>
|
||||
- </alias>
|
||||
</fontconfig>
|
Loading…
Reference in a new issue